针对性屏蔽Enter

This commit is contained in:
RuoYi
2020-04-30 15:53:17 +08:00
parent 27f40d0357
commit 2c8365b605
2 changed files with 6 additions and 4 deletions

View File

@ -55,9 +55,11 @@ $(function() {
});
// 取消回车自动提交表单
$(document).on("keypress", "form", function(event) {
return event.keyCode != 13;
});
$(document).on("keypress", ":input:not(textarea):not([type=submit])", function(event) {
if (event.keyCode == 13) {
event.preventDefault();
}
});
// laydate 时间控件绑定
if ($(".select-time").length > 0) {