With jQuery, how do I find out which key was pressed when I bind to the keypress event?
$(\'#searchbox input\').bind(\'keypress\', function(e) {}); >
$(\'#searchbox input\').bind(\'keypress\', function(e) {});
Add hidden submit, not type hidden, just plain submit with style="display:none". Here is an example (removed unnecessary attributes from code).
it will accept enter key natively, no need for JavaScript, works in every browser.