通过JS 给这个input加一个事件 就是获得焦点就行了
window.onload = function(){
var oInput = document.getElementById("strName");
oInput.focus();
}






JS监听某个输入框
//回车事件绑定
$('#strName').bind('keyup', function(event) {
  if (event.keyCode == "13") {
    //回车执行查询
    $('#search_button').click();
  }
});
 

 

相关文章:

  • 2022-12-23
  • 2021-09-21
  • 2022-12-23
  • 2021-07-03
  • 2022-02-22
  • 2021-11-01
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2021-11-22
  • 2021-08-18
  • 2021-12-19
相关资源
相似解决方案