js: 阻止按enter键提交表单
<input type="button" id="contact" class="btn btn-danger auto-save" value="Confirm to Delete" disabled>
$("#contact").bind("keypress keydown keyup", function (e) {
if (e.keyCode == 13) {
event.preventDefault();
return false;
}
})
本文来自博客园,转载请注明原文链接:https://www.cnblogs.com/keeplearningandsharing/p/16454095.html
浙公网安备 33010602011771号