<body onmousedown="whichElement(event)">
</body>
function whichElement(e) {
if (e.button == 2 || e.button == 4) { alert("右键被阻止了"); $.preventDefault();//阻止右键 }
}