How to Disable Right-Clicking
<script type='text/javascript'>
//<![CDATA[
var message="NoRightClicking is allowed in our website";
function arpianDisableClick() {
if (document.all) {
alert(message); //Remove this line if you don't want alert message
return false;
}
}
function arpianNoRightClick(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {
alert(message); //Remove this line if you don't want alert message
return false;}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=arpianNoRightClick;
} else{
document.onmouseup=arpianNoRightClick;
document.oncontextmenu=arpianDisableClick;
}
document.oncontextmenu=new Function("return false")
//]]></script>
0 Comments
Please do not enter any spam link in the comment box.