jQuery capture ‘Enter’ key in text field
Fiddle http://jsfiddle.net/pootie/8wGFe/2/ Code $(document).ready(function() { $(’#searchBox’).keypress(function(event){ var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == ’13’){ alert(’You pressed a "enter" key in textbox’); } }); }$(document).ready(function() { $(‘#searchBox’).keypress(function(event){ var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == ’13’){…