键盘对应代码

< html >
< head >
< style >
body {color:#FF0000;font
- size:15px;}
</ style >
</ head >
< body >
< SCRIPT language = " JScript " >
<!--
function  keydown()
{
if (event.keyCode)
{
document.all(
" keycode " ).innerHTML  =   " You just clicked the No.<B> "   +  event.keyCode  +   " </B> key " ;
window.focus();
}
}
document.onkeydown 
=  keydown;
-->
</ SCRIPT >
< div id = " keycode " > Please click a key  </ div >
</ body >
</ html >

你可能感兴趣的:(代码)