fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <script> function isKeyPressed(event){ if (event.altKey==1){ alert(" ALT 键被按下!"); }else{ alert(" ALT 键没被按下!"); } } </script> </head> <body onmousedown="isKeyPressed(event)"> <p>点击该段落,尝试按下或者不按下shift 键的效果。</p> </body> </html>
运行结果