Having an Enter key submit a form is standard but can sometimes prove problematic, this should solve that problem.


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

Leave a Reply