防鼠標右擊代碼
信息來源:
優度網絡 發布日期:2009/4/4 瀏覽數量:
1083次
文章導讀:
<SCRIPT language=JavaScript>
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
</SCRIPT>