菜单切换
FACESOHO知行者
心灵
记录
远方
赞赏工具
源代码:
点击运行
保存
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>小鸟启蒙(facesoho.com)</title> <script> function whichButton(event){ alert(event.keyCode); } </script> </head> <body onkeyup="whichButton(event)"> <p><b>注释:</b>在测试这个例子时,要确保右侧的框架获得了焦点。</p> <p>在键盘上按一个键。消息框会提示出该按键的 unicode。</p> </body> </html>
运行结果