测试键盘

<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>测试键盘</title>
<script language="javascript">
function keyDown(){
var ekey;
ekey = event.keyCode;
var realkey;
realkey=String.fromCharCode(ekey);
alert("ekey="+ekey+"realkey="+realkey);
}
document.οnkeydοwn=keyDown
</script>
</head>
<body>
</body>
</html>
 
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页