Answers for "how to prevent the form submit on enter in jquery"

1

jquery avoid enter submit

$(document).ready(function() {
  $(window).keydown(function(event){
    if(event.keyCode == 13) {
      event.preventDefault();
      return false;
    }
  });
});
Posted by: Guest on June-12-2020

Code answers related to "how to prevent the form submit on enter in jquery"

Browse Popular Code Answers by Language