Overriding the F1 key in FF, chrome, ie. Is F1 on ie8/chrome on keyup and in FF on keypress? What about <tab> in an input field?
问题 I'm creating namespaced events with jquery. When I use the following function with code=112, a function, bool=false, everything works fine in FF and the F1 key submits to my function and the event does not bubble up to open the firefox help in a new tab. function bindKeyFunc(code, func, bool){ $(document).bind('keypress.' + code, function(e){ var c = (e.keyCode ? e.keyCode : e.which); //console.log(c); if ( code == c) { //e.stopPropagation(); //e.preventDefault(); func(); return bool; } }); }