1997: Tutorial : Disable Right Click

Tutorial : Disable Right Click

14 November 2011

1) Bukak template korang the Ctrl=F search code <head> atau <html>.
2) Paste code bawah ni dekat atas code <head> atau <html> tu tadi.
<script language=JavaScript>
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
</script>     
3) Preview dulu. Takut tak menjadi meraung satu rumah nanti. Lepas ok tiada eror, baru save.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...