如何将鼠标光标放在某个输入框中

sk.*_*sk. 2 html php input cursor

如何将光标自动放置到某个输入框.这有助于在打开页面时不会一直使用鼠标.(php和html)

谢谢!

ant*_*ant 8

<input name="input1" id="input1" value="" />

window.onload = init;

function init(){
document.getElementById("input1").focus();
}
Run Code Online (Sandbox Code Playgroud)

这应该做