disable enter key jquery code example
Example 1: html disable enter submit
//per form disabling
<form ... onkeydown="return event.key != 'Enter';">
//or with jquery
<script>
$(document).on("keydown", "form", function(event) {
return event.key != "Enter";
});
</script>
Example 2: jquery disable enter key submit
$(document).on('keyup keypress', 'input', function(e) {
if(e.which == 13) {
e.preventDefault();
return false;
}
});