To disable enter key on a form in jQuery you can use the following snippet.

Sample jQuery

$("#form").keypress(function(event) {
  if (event.which == 13) {
    return false;
  }
});

2 thought on “How to disable enter key on a form in jQuery”

Leave a Reply