»
AnglaisFran�aisVietnamien

Imprimer - Field Focus - JavaScriptBank.com

Version compl�te: jsB@nk » Form » Field Focus
URL: https://www.javascriptbank.com/field-focus.html

Field Focus © JavaScriptBank.comUn simple petit script et de mettre l'accent sur tout forme élément que vous voulez quand le chargement d'une page.

Version compl�te: jsB@nk » Form » Field Focus
URL: https://www.javascriptbank.com/field-focus.html



JavaScript
<SCRIPT LANGUAGE="JavaScript">// John Munn  ([email protected])<!-- Begin function putFocus(formInst, elementInst) {  if (document.forms.length > 0) {   document.forms[formInst].elements[elementInst].focus();  } }// The second number in the "onLoad" command in the body// tag determines the form's focus. Counting starts with '0'//  End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onLoad="putFocus(0,1);"><form method="post" name="bogus" id="bogus-form"><input type="text" name="bogus_field0" id="bogus_field0" size="20" maxlength="12"><br><input type="text" name="bogus_field1" id="bogus_field0" size="20" maxlength="12" value="Form focus is here!"><br><input type="text" name="bogus_field2" id="bogus_field0" size="20" maxlength="12"></form><BODY/><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->