首页 > 网站 > WEB开发 > 正文

打开页面后,随便按某个键,页面就自动检测出键值

2024-04-27 13:57:34
字体:
来源:转载
供稿:网友
<!--把如下代码加入<body>区域中 -->
<body bgcolor="#ffffff" onkeydown="alert('你输入的键的键值是: ' + window.event.keyCode)" style="font-family: verdana; font-size: 9px; background-color: buttonface; border: 0; color: buttontext; text-align: center;">
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表