Teachwiki

Disble Right CliCk On WebSite

Jul 14th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <script language=JavaScript>
  2. <!--
  3.  
  4. //edit by unwanted
  5.  
  6.  
  7. var message="PUT YOUR MESSEGE HERE";
  8.  
  9. ///////////////////////////////////
  10. function clickIE4(){
  11. if (event.button==2){
  12. alert(message);
  13. return false;
  14. }
  15. }
  16.  
  17. function clickNS4(e){
  18. if (document.layers||document.getElementById&&!document.all){
  19. if (e.which==2||e.which==3){
  20. alert(message);
  21. return false;
  22. }
  23. }
  24. }
  25.  
  26. if (document.layers){
  27. document.captureEvents(Event.MOUSEDOWN);
  28. document.onmousedown=clickNS4;
  29. }
  30. else if (document.all&&!document.getElementById){
  31. document.onmousedown=clickIE4;
  32. }
  33.  
  34. document.oncontextmenu=new Function("alert(message);return false")
  35.  
  36. // -->
  37. </script>
Add Comment
Please, Sign In to add comment