Discuz程序添加禁止右击和禁止使用F12 js语句

[复制链接]
查看2205 | 回复0 | 2020-2-9 08:27 | 显示全部楼层 |阅读模式
Discuz程序添加禁止右击和禁止使用F12 js语句
  1. <script type="text/javascript">
  2.         function click(e) {
  3. if (document.all) {
  4. if (event.button==2||event.button==3) { alert("支持正版,有需求请与管理联系QQ:6369341!谢谢您的合作!!!");
  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 == 123) {
  21. window.event.returnValue=false;
  22. return(false);
  23. }
  24. }
  25. </script>
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

UID
1
贡献
387
丢币
38902
主题
4607
回帖
116
注册时间
2018-9-25
最后登录
2024-4-16