CSDN博客

img zhizhubao

键盘按键代码捕获演示

发表于2004/10/20 15:01:00  706人阅读

Keycode 演示

<HTML>
 <HEAD>
 </HEAD>
 <BODY>
  请华丽的按键吧<BR>
  <BR>
  <SPAN id="keycode">
   <FONT face="宋体"></FONT>
  </SPAN>
  <SCRIPT language="JScript">
  <!--
  function keydown()
  {
   if(event.keyCode)
   {
    document.all("keycode").innerText = "You just clicked the No. " + event.keyCode + " key";
   }
  }

  document.onkeydown = keydown;
  -->
  </SCRIPT>
 </BODY>
</HTML>

阅读全文
0 0

相关文章推荐

img
取 消
img