1、添加一个隐形的文本框
<input type="text" style="display:none"/>

2、form表单设置 添加  onsubmit="return false;"
<form class="schoolfellow-form" action="" onsubmit="return false;">
</form>
//监听回车事件
$(document).ready(function () { document.onkeydown
= function (event) { if (event.keyCode == 13) //回车键的键值为13 search();//回车需执行的方法 }; });

 

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-11-11
  • 2021-12-05
  • 2021-09-27
猜你喜欢
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2023-01-28
  • 2022-12-23
相关资源
相似解决方案