Method One:

  //回车提交事件
  $("body").keydown(function () {
      debugger;
      alert(event.keyCode);
       if (event.keyCode == "13") {//keyCode=13是回车键
          Search(1);
       }
   });

 

Method Two:
    $(document).keydown(function () { if (event.keyCode == 13) $("#btnSearch").click(); }); 

相关文章:

  • 2021-10-05
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2021-05-17
  • 2021-11-27
相关资源
相似解决方案