If your only goal is to set the focus on page load you can also use autofocus
autofocus
Note: it doesn't change the focus after the page loads. Here's the details