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>
8 comments:
where should i paste the code ?
Thanks for your info friend... n met lebaran ya..
Saung Web
@K : Just drop the code before </head>
postingnya keren-keren
paste to notepad or what??
info yang sangat bagus sekali
keren gan infonya...
info yang sangat bermanfaat sekali...
Post a Comment
Please submit your comments below.
If you find an error on word verification, just click at the "word verification" to show the word verification box.
Thanks