//阻止浏览器当前DIV默认右键事件

$("div").unbind("mousedown").bind("contextmenu", function (e) {
e.preventDefault();
return false;
});
$("div").unbind("mousedown").bind("mousedown", function (event) {

//3是右键
if (event.which == 3) {
  alert(‘right’)
}else if(event.which == 1){

  alert('left');  

}
});

相关文章:

  • 2021-12-12
  • 2021-04-05
  • 2021-10-06
  • 2021-10-12
  • 2021-10-22
  • 2021-09-10
  • 2021-10-08
  • 2021-09-28
猜你喜欢
  • 2021-11-15
  • 2021-11-05
  • 2021-09-10
  • 2021-10-06
  • 2021-09-10
  • 2021-09-10
  • 2021-10-06
  • 2021-10-06
相关资源
相似解决方案