Last active
November 5, 2015 14:14
-
-
Save johnbocook/5878a76b907f630b4e2d to your computer and use it in GitHub Desktop.
You can place a user's cursor inside an input via focus as soon as the page is loaded. This helps ensure that visitors do not 'overlook' an important form item on your site.
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
| //Change coolFormName to form's name. | |
| <body onload="document.coolFormName.user.focus();"> | |
| <form name="coolFormName"> | |
| Name: <input type=text name=user size=10> | |
| </form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment