jQuery is a great alternative to adding the focus since its simply a matter of adding a few lines of code to your page. It will work on multiple browsers, whether it be Internet Explorer, Firefox, Chrome, or Safari.
If you want the first visible element of the page to be focused:
If you want a specific element to be focused, such as a search box:
will set the focus for your input element with the name “MY_INPUT_NAME”.