Disable Right Click On Mouse

Viksa
Posted by Viksa under JavaScript category on | Views : 2595
<script language="JavaScript">
<!--
function mouseDown(e)
{
if (parseInt(navigator.appVersion)>3)
{
var clickType=1;
if (navigator.appName=="Netscape") clickType=e.which;
else clickType=event.button;
if (clickType!=1) {
alert ('Your Message')
return false;
}
}
return true;
}
if (parseInt(navigator.appVersion)>3)
{
document.onmousedown = mouseDown;
if (navigator.appName=="Netscape")
document.captureEvents(Event.MOUSEDOWN);
}
//-->
</script>

Comments or Responses

Login to post response