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) {});
$(document).ready(function(){ $("#btnSubmit").bind("click",function(){$('#'+'<%=btnUpload.ClientID %>').trigger("click");return false;}); $("body, input, textarea").keypress(function(e){ if(e.which==13) $("#btnSubmit").click(); }); });
Hope this may help you!!!