Forum Moderators: open
How do i make a input field have the cursor in it, on a page load, so that i dont have to move/click the mouse before i can enter any data into it.
<body onload="document.getElementById('firstName').focus();">
<head> ... <script type="text/javascript"> function init() { var el = document.getElementById('firstName'); if( el ) el.focus(); } window.onload = init; </script> </head> <body> ... <input type="text" id="firstName"> ... </body>