[Beschreibung]
Setzt den Focus auf ein bestimmtes Formularfeld.
[Kompatibilität]
[Code]
<script language="JavaScript">
<!-- John Munn (jrmunn@home.com) -->
<!-- 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>
onLoad="putFocus(0,1);">
<div align="center"> <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"> </div>
John Munn
Kopieren Sie bitte den Code