<!DOCTYPE html>
<input type="text" id="toFocus"></input>
<script>
window.onload = function() {
document.querySelector("#toFocus").focus();
}
</script>
<!DOCTYPE html>
<input type="text" id="toFocus"></input>
<script>
window.onload = function() {
document.querySelector("#toFocus").focus();
}
</script>