<html><head><script type="text/javascript">function whichButton(event){alert(event.keyCode)}</script></head><body onkeyup="whichButton(event)"><p><b>注释:</b>在测试这个例子时,要确保右侧的框架获得了焦点。</p><p>在键盘上按一个键。消息框会提示出该按键的 unicode。</p></body></html>