1 <script>//禁止右键
2 function click(e) {
3 if (document.all) {
4 if (event.button==2||event.button==3) { alert("欢迎光临寒舍,有什么需要帮忙的话,请与站长联系!谢谢您的合作!!!");
5 oncontextmenu='return false';
6 }
7 }
8 if (document.layers) {
9 if (e.which == 3) {
10 oncontextmenu='return false';
11 }
12 }
13 }
14 if (document.layers) {
15 document.captureEvents(Event.MOUSEDOWN);
16 }
17 document.onmousedown=click;
18 document.oncontextmenu = new Function("return false;")
19 document.onkeydown =document.onkeyup = document.onkeypress=function(){
20 if(window.event.keyCode == 12) {
21 window.event.returnValue=false;
22 return(false);
23 }
24 }
25 </script>
26
27
28 <script>//禁止F12
29 function fuckyou(){
30 window.close(); //关闭当前窗口(防抽)
31 window.location="about:blank"; //将当前窗口跳转置空白页
32 }
33
34 function click(e) {
35 if (document.all) {
36 if (event.button==2||event.button==3) {
37 alert("欢迎光临寒舍,有什么需要帮忙的话,请与站长联系!谢谢您的合作!!!");
38 oncontextmenu='return false';
39 }
40
41 }
42 if (document.layers) {
43 if (e.which == 3) {
44 oncontextmenu='return false';
45 }
46 }
47 }
48 if (document.layers) {
49 fuckyou();
50 document.captureEvents(Event.MOUSEDOWN);
51 }
52 document.onmousedown=click;
53 document.oncontextmenu = new Function("return false;")
54 document.onkeydown =document.onkeyup = document.onkeypress=function(){
55 if(window.event.keyCode == 123) {
56 fuckyou();
57 window.event.returnValue=false;
58 return(false);
59 }
60 }
61 </script>