<HTML>
<HEAD>
<TITLE>键盘和鼠标事件测试</TITLE>
<script language="javascript">
<!--
function keyDown(e) {
s = "";
for(v in event)
s += v+"="+event[v]+"
";
view.innerHTML = s;
return false;
}
document.onkeydown=keyDown
document.onkeyup=keyDown
document.onmousedown=keyDown
document.onmouseup=keyDown
document.onmousemove=keyDown
document.onmouseover=keyDown
document.onmouseout=keyDown
document.onkeypress=keyDown
//-->
</script>
</HEAD>
<BODY>
<p>请操作鼠标或键盘</p> <input type=text>
<table border>
<tr><td>123</td></tr>
</table>
<table border>
<tr>
<td colspan=3 id="keyview"> </td>
</tr>
<tr>
<tr>
<td onClick="key(this)" onClick="key(this)" onClick="key(this)" </tr>
<tr>
<td onClick="key(this)" onClick="key(this)" onClick="key(this)" </tr>
<tr>
<td onClick="key(this)" onClick="key(this)" onClick="key(this)" </tr>
<tr>
<td colspan=2 onClick="key(this)" onClick="key(this)"> </td>
</tr>
</table>
<span id="view"></span>
</BODY>
</HTML>
键盘和鼠标事件测试
80酷酷网 80kuku.com