<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
#result {
width: 200px;
height: 100px;
line-height: 100px;
background: gray;
color: #fff;
position: absolute;
text-align: center;
top: 50px;
left: 50px;
cursor: pointer;
}
</style>
<script type="text/javascript" src="jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="mouseForK13.min.js"></script>
<script type="text/javascript">
$(function () {
$("#result").mouseForK13({
clickL:function () {
$("#result").empty().append("左键单击");
},
clickM:function () {
$("#result").empty().append("中键单击");
},
clickR:function () {
$("#result").empty().append("右键单击");
},
click2L:function () {
$("#result").empty().append("左键双击");
},
click2M:function () {
$("#result").empty().append("中键双击");
},
click2R:function () {
$("#result").empty().append("右键双击");
},
wheelT: function () {
$("#result").empty().append("向上滚动");
},
wheelB: function () {
$("#result").empty().append("向下滚动");
},
moveL: function (x,y) {
$("#result").css({left: x + "px", top: y + "px"}).empty().append("左键拖拽 X:" + x +" Y:" + y);
},
moveM: function (x,y) {
$("#result").css({left: x + "px", top: y + "px"}).empty().append("中键拖拽 X:" + x +" Y:" + y);
},
moveR: function (x,y) {
$("#result").css({left: x + "px", top: y + "px"}).empty().append("右键拖拽 X:" + x +" Y:" + y);
}
});
})
</script>
</head>
<body>
<div id="result"></div>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
js的左键单击双击拖拽右键单击双击拖拽以及滚轮事件.rar (4个子文件)
mouseForK13.js 7KB
jquery-1.8.3.min.js 91KB
mouseForK13.min.js 1KB
mouse.html 2KB
共 4 条
- 1
资源评论
- anglaider2016-02-18Firefox不行,也就只能参考吧
yyc_dong
- 粉丝: 1
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功