//阻止浏览器当前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');
}
});