Javascript is client side scripting mostly used for validation.
U can write a script under <HEAD> tag
Function to put cursor on textbox
function putFocus()
{
document.getElementById("TextboxID").focus();
return false;
}
call the function on Load of html Body tag
<body onload="return putFocus()"></body>