If you have one or more forms on your web page then you might like to make it slightly easier for your visitors to start inputting information into your form by giving the focus to the first input field within the form so that they can start typing straight away.
You can easily give the focus to the first input field by adding the following script just before the </body> tag of your page:
This code locates the first input field on the page (no matter what you have called it) and gives it the focus so that the keyboard cursor will appear at the start of the input field. It does check the value in the field first before giving it the focus so that if your visitor has alreay started filling out the form they don't suddenly find themselves back at the top of the form when the script runs.
This article written by Stephen Chapman, Felgall Pty Ltd.