If you're looking for a way to protect your web page content, including text and graphics, this tip is for you. This JavaScript will discourage the more novice Internet users from copying your text and graphics. An alert box will appear displaying your copyright information when the right mouse button is clicked. Keep in mind, this script will not protect your content from more experienced users and is very insecure. However, if you would like to use the following JavaScript, copy and Paste the following code into the BODY of your web page. <SCRIPT language="JavaScript"> <!-- var message="Copyright Year by Your Site. WARNING ! All content contained within this site is protected by copyright laws. Unauthorized use of our material is strictly prohibited."; function click(e) { if (document.all) { if (event.button==2||event.button==3) { 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> Insert your own copyright information where indicated in red. thank you
Webmasters stopped using this trick to the end of 90's. Mainly because the user who can be stopped by this code will never try to copy/paste your text and images.
And you're not even capturing keyboard events (ctrl+c) - anyway this protection is stupid. People can just view the source or disable javascript altogether.