2010-11-20 4 views

Répondre

0

Yeh sur w3schools vous obtiendrez tous les tutoriels et de détecter entrer le code de presse clé est ici:

*************************************************************************** 
*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 
} 
Questions connexes