js:
html:
function focus(){
document.getElementById("loginId").focus();
}
html:
<body onLoad="focus();">