首页 > Web开发 > 详细

HTML页面右键事件

时间:2017-09-08 14:23:06      阅读:229      评论:0      收藏:0      [点我收藏+]

<script type="text/javascript">
<!--
document.onmousedown = function (e) {
var e = e || window.event
alert("e" + e.button);
if (e.button == "2") {
alert("执行右键代码");
}
}
//-->
function right() {

var e = window.event;
alert(e.button);
if (e.button == "0") {
alert("左键");
} else {
alert("右键");
}
}
</script>

HTML页面右键事件

原文:http://www.cnblogs.com/zhangwei99com/p/7494226.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!