Pingback: Solution: jQuery Event Keypress: Which key was pressed? (document).keypress(function(event). var keycode (event.keyCode ? event.keyCode : event.which) if(keycode 13) alert(You pressed a " enter" key in somewhere) ) P.S In Firefox, you have to use event.which to get the keycode while IE support both event.keyCode and event.which. (cmbCIMtrekDailyshipCoCustomerName select).bind(keypress, function(e) var codebut is not giving alert when I press Enter key. What could be the problem and how to solve it?jquery deferred promises executing out of order.