[查看演示] 源码如下 ---------------------------------------------------------- <html>
<script>
function show(){
alert("ASCII代码是:"+event.keyCode);
}
</script>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>键盘代码-51windows.com-www.51windows.Net</title>
<style>
<!--
body { font-family: Verdana; color: #000080; font-size: 9pt }
-->
</style>
</head>
<body onKeyDown=show()>
<p align="center">请按键盘</p>
<INPUT onkeyup=this.value=event.keyCode>
</body>
</html>
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div> |