<body onmousedown="whichElement(event)">
</body>
function whichElement(e) {
if (e.button == 2 || e.button == 4) {
alert("右键被阻止了");
$.preventDefault();//阻止右键
}
}
原文:http://www.cnblogs.com/lideshun/p/4230217.html