废话不多说,直接上代码 复制代码 代码如下: function keyUp(){ if(navigator.appName == "Microsoft Internet Explorer"){ var keycode = event.keyCode; }else{ varkeycode = keyUp.caller.arguments[0].which; } alert(keycode); }