Is this possible?
Announcement
Collapse
No announcement yet.
Adding focus to first form field without using body onload..
Collapse
X
-
Originally posted by AshleyQuick
Nevermind, got it working with:
function setFocus() {
document.forms[0].elements[0].focus;
}
window.onload=setFocus;
document.forms[0].elements[0].focus();
}
Shorter version:
window.onload=function(){document.forms[0].elements[0].focus();}
Comment
Comment