动网论坛,站长建站首选,国内使用量最多的论坛软件 动网论坛官方技术讨论区 站长工具 申请属于您自己的免费论坛
首页 | 新闻资讯 | 网站运营 | 网络编程 | 数据库 | 服务器 | 网页设计 | 图像媒体 | 网络应用 | 搜索优化 | 资源下载 | 动网主机 | DVBOX
    本站内  互联网 ASP论坛  ASP.Net论坛  PHP论坛
  
   PHP → 阅读文章

 键盘和鼠标事件测试

作者来源: 
阅读 1576 人次 , 2006-3-29 4:08:00 


<html>

<head>
<title>键盘和鼠标事件测试</title>
<script language="javascript">
<!--

function keydown(e) {
s = "";
for(v in event)
s += v+"="+event[v]+"<br>";
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)" style="cursor=hand;">7</td>
<td onclick="key(this)" style="cursor=hand;">8</td>
<td onclick="key(this)" style="cursor=hand;">9</td>
</tr>
<tr>
<td onclick="key(this)" style="cursor=hand;">4</td>
<td onclick="key(this)" style="cursor=hand;">5</td>
<td onclick="key(this)" style="cursor=hand;">6</td>
</tr>
<tr>
<td onclick="key(this)" style="cursor=hand;">1</td>
<td onclick="key(this)" style="cursor=hand;">2</td>
<td onclick="key(this)" style="cursor=hand;">3</td>
</tr>
<tr>
<td colspan=2 onclick="key(this)" style="cursor=hand;">0</td>
<td onclick="key(this)"> </td>
</tr>
</table>

<span id="view"></span>
</body>
</html>

 
 收藏本文  打印本文  论坛讨论  关闭窗口
· 上一篇:ubbcode类
· 下一篇:编码对照表的使用
· PHP调用三种数据库的方法(2)
· PHP4连接Oracle 8i的方法(转译)
· 如何提高你的PHP编程技术
· PHP安全配置(2)
· 模板,PHPLIB处理方式(二)


关于本站 | 联系我们 | 业务合作 | 客户案例 | 诚聘英才 | 广告合作 | 收藏本站
海口动网先锋网络科技有限公司版权所有
Copyright © 2000 - 2006 Cndw.Com
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077