<input type = "text" id="football" />
对上面获取焦点。
1.获取dom对象
var domFocus = document.getElementById("football");
2.dom对象获取焦点
domFocus.focus();
<input type = "text" id="football" />
对上面获取焦点。
1.获取dom对象
var domFocus = document.getElementById("football");
2.dom对象获取焦点
domFocus.focus();
转载于:https://www.cnblogs.com/lamiyiyi/p/3520169.html