Setting focus to an input Field when the PageLoads using JavaScript in HTML
<html>
<head runat="server">
<title>Untitled Page</title>
<script type ="text/javascript" >
function focusmethd()
{
document.getElementById("TextBox1").focus();
} </script>
</head>
<body
onload="focusmethd()")>
<form id="form1">
<input type="text" ID="TextBox1">
<input type="text" ID="TextBox2">
</form>
</body>
</html>