jquery处理鼠标左中右键事件
2024-09-29 21:46:22
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>智能社——http://www.zhinengshe.com</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black"> </head>
<body>
<input type="button" value="按钮" id="test">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script>
$("#test").mousedown(function(e){
if(e.which==1){
alert("这是 左 键单击事件");
}else if(e.which==2){
alert("这是 中 键单击事件");
}else if(e.which==3){
alert("这是 右 键单击事件");
}
})
</script>
</body>
</html>
最新文章
- 自制文件上传JS控件,支持IE、chrome、firefox etc.
- jq实现点击表格无刷新修改数据,优化版
- php : 类常量
- linux学习之——学习路线(摘抄)
- 图解VS2010打包全过程(转)
- 判断子元素(or属性)是否存在
- Javascript---数组常用方法
- tech
- 关于APlayer播放器在打包安装后提示“没有注册类”的解决办法
- Python学习笔记(十五):类基础
- 符号文件(.pdb)——Windows 应用程序调试必备
- codeforces 598D Igor In the Museum
- malloc,free简单的实现
- [css 实践篇] CSS box-orient
- python的位置参数、默认参数、关键字参数、可变参数区别
- cookie和session的讲解
- webpack安装
- Linux分区知识及企业场景分区76
- 算法实践--最长递增子序列(Longest Increasing Subsquence)
- CF494C Helping People 解题报告