As a solution to the following problem, please make sure that you have tried out the code listed below:
<!DOCTYPE html>
<html>
<body>
<p>In this example, the text field gets focus immediately after the document window has been loaded.</p>
<input type="text" id="myText" value="A text field">
<script>
window.onload = function() {
document.getElementById("myText").focus();
};
</script>
</body>
</html>
Specifically, this code is working for me when opening HTML-document using Google Chrome Browser.
Also, there are the guidelines explaining how to set focus on a specific input field when page is loaded:
HTML DOM focus() Method
[
^]
Tryit Editor v3.6[
^]
Enjoy! :)