Autofocus attribute allows a form field to be immediately focused on page load.
Autofocus attribute is already supported by all major browser so it should be really easy to get it working cross browser.
You can use Autofocus attribute like this:
<input type="text" autofocus></input>
More information can be found here.