JQuery html form disable form submit on press enter
Just use below code and replace your id with "rjform"
jQuery('#rjform').on('keyup keypress', function(e) {
var code = e.keyCode || e.which;
if (code == 13) {
e.preventDefault();
return false;
}
});
jQuery('#rjform').on('keyup keypress', function(e) {
var code = e.keyCode || e.which;
if (code == 13) {
e.preventDefault();
return false;
}
});
Comments
Post a Comment