Autofocus on a textfield after page load [HTML]
After page load, you want to put the focus on a textfield. For instance you have a form and you want to focus on the first field thus users can type immediately. See for instance the Google search page.
I tried several variations and this is what worked for me:
Here I suppose to have the following form:
<form name="login_form" action="process.php" method="POST"> <input type="text" name="email" /> ... </form>
This tip is from here.
As it is pointed out here, you can use the
autofocus attribute on HTML5 compatible browsers:
<input name="myinput" value="whatever" autofocus />