Sometimes, you may be want the html source of your blog not easy to see or may be we want to hide the properties. One of many ways to to it is by turn off or disable right click.
Below are the script that you can use to turn off the right click.
Just copy the code and paste it between <head> and </head> tag.
<script language="JavaScript">
var message="Sorry..! Right Click is NOT ALLOWED";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
</script>
where should i paste the code ?
ReplyDeleteThanks for your info friend... n met lebaran ya..
ReplyDeleteSaung Web
@K : Just drop the code before </head>
ReplyDeletepostingnya keren-keren
ReplyDeletepaste to notepad or what??
ReplyDeleteinfo yang sangat bagus sekali
ReplyDeletekeren gan infonya...
ReplyDeleteinfo yang sangat bermanfaat sekali...
ReplyDelete