html表单enter键按下自动提交

当表单里面只有一个<input type="text">的时候,键盘的enter键按下的时候会自动onsubmit提交。


如果不需要这个功能的话 

   1,可以设定在设定一个 <input type="text" style='display:none' />  OR  <input type="text" hidden='true'/>

   2,<form οnsubmit="retrun false">


版权声明:本文为qlslvsnow原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。