/ Published in: JavaScript
Expand |
Embed | Plain Text
$('#input_text').keyup(function(e) { //alert(e.keyCode); if(e.keyCode == 13) { alert('Enter key was pressed.'); } });
Comments
Subscribe to comments
You need to login to post a comment.

Thank you. Really helped me :)
this code was GREAT helped me add a very useful feature for quick search.
one thing I noticed specifically on asp.net web form is right after the "alert" or whatever you have that executes, add a "return false;" which will stop the form submission. (worked for me).