Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

block enter key using jquery

If keyCode is not caught, catch which:

$('#formid').on('keyup keypress', function(e) {
  var keyCode = e.keyCode || e.which;
  if (keyCode === 13) { 
    e.preventDefault();
    return false;
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #block #enter #key #jquery
ADD COMMENT
Topic
Name
4+9 =