A small snippet for Setting TextBox Focus on page load using Java Script.

Add the following java script the in the body tag to set the focus. In the snippet “form1” is the form name, “txtBox” is the input text box name.


<body onLoad="document.form1.txtBox.focus();">