📅  最后修改于: 2022-03-11 15:01:24.580000             🧑  作者: Mango
If keyCode is not caught, catch which:
$('#formid').on('keyup keypress', function(e) {
var keyCode = e.keyCode || e.which;
if (keyCode === 13) {
e.preventDefault();
return false;
}
});