<body onmousedown="whichElement(event)">
</body>
function whichElement(e) {
if (e.button == 2 || e.button == 4) {
alert("右键被阻止了");
$.preventDefault();//阻止右键
}
}
时间: 2024-10-09 11:06:41
<body onmousedown="whichElement(event)">
</body>
function whichElement(e) {
if (e.button == 2 || e.button == 4) {
alert("右键被阻止了");
$.preventDefault();//阻止右键
}
}