Check for enter key using jQuery


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $('#input_text').keyup(function(e) {
  2. //alert(e.keyCode);
  3. if(e.keyCode == 13) {
  4. alert('Enter key was pressed.');
  5. }
  6. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.