Cara Buat Disable Right Click



Disable Right Click ini penting supaya orang lain tak boleh nak copy paste sesuka hati dari blog anda..
Aku akan ajarkan cara-cara buat Disable Right Click with Alert Message..

Contoh macam gambar bawah ini ^^



1. Dashboard >Design>Add a Page element >html/javascript

2. Copy Paste kan kod di bawah ini.

<script language=JavaScript>
<!--

//edit by unwanted


var message="Masukkan mesej yang anda nak di sini";

///////////////////////////////////
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>

Siap !!

Selamat Mencuba !!
Copyright © Nonita Fabric | All Rights Reserved | Designed by Whitey Mommy Back to Top|Sign in