<!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>
- 1
- 2
前往页