fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> </head> <body> <p>在输入框中按下 Esc 键(左上角)会弹出提示信息。</p> <input type="text" size="50" onkeydown="keyCode(event)"> <script> function keyCode(event) { var x = event.keyCode; if (x == 27) { alert ("你按下了 Esc 键!"); } } </script> </body> </html>
运行结果