Answers for "jquery input on press enter without submit"

CSS
0

prevent enter key submitting a form jquery

$('#formid').on('keyup keypress', function(e) {
  var keyCode = e.keyCode || e.which;
  if (keyCode === 13) { 
    e.preventDefault();
    return false;
  }
});
Posted by: Guest on September-14-2021

Code answers related to "jquery input on press enter without submit"

Browse Popular Code Answers by Language