Created
August 11, 2013 09:56
-
-
Save apphp-snippets/6204249 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- source: http://www.apphp.com/index.php?snippet=javascript-focus-on-load --> | |
<!-- This part goes into your body tag --> | |
<body OnLoad="document.myform.user.focus();"> | |
<!-- You you just use the name of the form and field name within your form --> | |
<form name="myform"> | |
Name: <input type="text" name="user" size="10"> | |
Email: <input type="text" name="email" size="10"> | |
</form> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment