$('#search_input').bind('keypress', function (event) {
            if (event.keyCode == "13") {
                //Search()
                event.preventDefault();
            }
        });

 或者利用form,但假若搜索函数里有跳转链接,一般要去掉form默认提交事件(return false;)

相关文章:

  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2022-01-01
猜你喜欢
  • 2022-12-23
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案