»
AnglaisFran�aisVietnamien

Imprimer - Enter Key Focus - JavaScriptBank.com

Version compl�te: jsB@nk » Form » Enter Key Focus
URL: https://www.javascriptbank.com/enter-key-focus.html

Enter Key Focus © JavaScriptBank.comForme les utilisateurs peuvent se déplacer à la prochaine zone de texte en appuyant sur la touche Entrée.

Version compl�te: jsB@nk » Form » Enter Key Focus
URL: https://www.javascriptbank.com/enter-key-focus.html



JavaScript
<SCRIPT>Tab=0function GetKey(evt){if(navigator.appName=="Netscape"){theKey=evt.which}if(navigator.appName.indexOf("Microsoft")!=-1){theKey=window.event.keyCode}window.status=theKey;if(theKey==13){Tab=(Tab<4)?Tab+1:0document.forms[0][Tab].value=""document.forms[0][Tab].focus()}}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=document.forms[0].Text1.focus()><FORM><TABLE cellSpacing=2 cellPadding=4 border=2>  <TBODY>  <TR>    <TD>Text1    <TD>Text2    <TD>Text3    <TD>Text4    <TD>Text5   <TR>    <TD><INPUT onkeypress=GetKey(event) size=5 name=Text1>     <TD><INPUT onkeypress=GetKey(event) size=5 name=Text2>     <TD><INPUT onkeypress=GetKey(event) size=5 name=Text3>     <TD><INPUT onkeypress=GetKey(event) size=5 name=Text4>     <TD><INPUT onkeypress=GetKey(event) size=5 name=Text5> </TR></TBODY></TABLE></FORM></BODY><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->