js获取焦点

<input type = "text" id="football" />

对上面获取焦点。

1.获取dom对象

var domFocus = document.getElementById("football");

2.dom对象获取焦点

domFocus.focus();

原文地址:https://www.cnblogs.com/lamiyiyi/p/3520169.html