<script> function keyUp(e) { var currKey=0,e=e||event; currKey=e.keyCode||e.which||e.charCode; var keyName = String.fromCharCode(currKey); alert("按键码: " + currKey + " 字符: " + keyName); } document.onkeyup = keyUp; </script>
<script> function keyUp(e) { var currKey=0,e=e||event; currKey=e.keyCode||e.which||e.charCode; var keyName = String.fromCharCode(currKey); alert("按键码: " + currKey + " 字符: " + keyName); } document.onkeyup = keyUp; </script>