|
|||||||||||||||||||||||||
|
JavaScript: Textbox Focus OnLoad This script sample moves the cursor focus to the specified textbox on page load when placed in the body of your document. <FORM NAME="form_name" ACTION="http://www.yourdomain.com/cgi-bin/processme.cgi" METHOD="get"> <INPUT TYPE="text" NAME="input_name" /> <INPUT TYPE="submit" VALUE="Submit" /> </FORM> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- document.form_name.input_name.focus(); //--> </SCRIPT> |