Newsletter Newsletter
Name
E-mail*
 
 
Shopping Cart
0 items
 
Share This Page
| More

Follow Us With

Twitter
Facebook
 
Bestsellers
 

How to protect your website from right clicking

You can use this php script to protect your website from right clicking (for example when you want to limit the content copy and using the copy function or similar)

<script language=JavaScript>
var message="Put your message here";
function click(e){
  
if( document.all ){
     
if( event.button==2 ){
        
alert( message );
        
return false;
     
}
   }
  
if( document.layers ){
     
if( e.which==3 ){
        
alert( message );
        
return false;
     
}
   }
}
if( document.layers ){
  
document.captureEvents( Event.MOUSEDOWN );
}
document.onmousedown = click;
<
/script>