Начало
Формы
Центр формы
Помещает внимание на первую editable область в форме на любой веб-странице.
JavaScript Forms:
Центр формы
<!-- THREE STEPS TO INSTALL FORM FOCUS: 1. Copy the coding into the HEAD of your HTML document 2. Add the onLoad event handler into the BODY tag 3. Put the last coding into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin function placeFocus() { if (document.forms.length > 0) { var field = document.forms[0]; for (i = 0; i < field.length; i++) { if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) { document.forms[0].elements[i].focus(); break; } } } } // End --> </script> </HEAD> <!-- STEP TWO: Insert the onLoad event handler into your BODY tag --> <BODY OnLoad="placeFocus()"> <!-- STEP THREE: Copy this code into the BODY of your HTML document --> <form> <input type=text size=10> </form> <!-- Script Size: 1.15 KB -->