Preventing the use of a right mouse click
You can prevent visitors using a
right mouse click on your page. This can provide some basic protection of your source code and photos. Place this script in your page between the
<HEAD> and
</HEAD>:
<SCRIPT language=JavaScript1.1>
<!-- Begin
function non(clic) {
var msg="message";
if (navigator.appName == 'Netscape' && clic.which==3) {
alert(msg);
return false;}
else
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
alert(msg);
return false;
}
return true;
}
document.onmousedown = non;
// End -->
</SCRIPT>
If a visitor right-clicks on your page, a window will display your predefined
message.
Discover all Webmaster scripts.