通过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();
  }
});
 

 

posted on 2019-03-27 09:42  巴黎夜雨……  阅读(11174)  评论(0编辑  收藏  举报