|
<script language="javascript"> function click() { if (event.button==1) { //改成button==2为禁止右键最好再加||button==3防止被破解如代码3 alert('对不起,禁止使用此功能.') } } document.onmousedown=click </script>
代码2 <SCRIPT> document.oncontextmenu = new Function("return false;") </script>
代码3 <script language="JavaScript"> function click(e) { if (document.all) { if (event.button==2||event.button==3) { oncontextmenu='return false'; } } if (document.layers) {//NNS下的 if (e.which == 3) { oncontextmenu='return false'; } } } if (document.layers) { document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=click; document.oncontextmenu = new Function("return false;") </script>
代码4 <body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false" onmouseup="document.selection.empty()">
|