IE和火狐下获取键盘按下事件 window.event.keyCode window.event.which
<script type="text/javascript">document.onkeydown = function (e){ var theEvent = window.event || e; var code = theEvent.keyCode || theEvent.which; document.getElementById("result")....