Detect enter key using jQuery


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



Copy this code and paste it in your HTML
  1. $('#something').keyup(function(event) {
  2. if(event.keyCode == 13) {
  3. alert('Enter key pressed :D');
  4. }
  5. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.