We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

penguin999 on 10/04/07


Tagged

key jquery enter


Versions (?)


Who likes this?

5 people have marked this snippet as a favorite

vali29
heinz1959
AgentPhoenix
yetanother
korzhik


Check for enter key using jQuery


Published in: JavaScript 


  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 

You need to login to post a comment.