Да, на w3schools вы получите все учебные пособия, а для определения кода нажмите здесь:
***************************************************************************
*Pressing the "ENTER Key" or the "RETURN Key" usually generates
*two characters: i.e., the "carriage return" character followed by
*the "line feed" character. Regular expressions will be used to
*check this character combination to identify whether the "ENTER
*Key" or the RETURN Key" is pressed or not.
****************************************************************************/
if(this.Text.match(/\r\n/))
{
Alert("Enter is not allowed!\nPlease use the command button.");
this.Text = this.Text.replace( /\r\n/gi,"");
// good place to fire off a CommandButton
}