Kamis, 25 Agustus 2011

Cara Disable Right Click (Menonaktifkan Klik Kanan)

Dashboard >>Design >>Page Element >>Add Gadget >>HTML/Javascript

Pastekan kode ini di tab HTML mu tadi:

DISABLE RIGHT CLICK WITH MESSAGE:

<script language=JavaScript>
<!--

//edit by unwanted


var message="TEKS KAMU TULIS DISINI";

///////////////////////////////////
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>
P/s: Yang huruf Tebal kamu ganti pakai pesan alert mu sendiri.

-----------------------------------------------------------

DISABLE RIGHT CLICK WITHOUT MESSAGE:

<script language=javascript>
<!--
//Disable right click script III- By Lettha (renigade@mediaone.net)
//For full source code, visit http://letthaprincess.blogspot.com
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>
Selesaikan SAVE !

CREDIT to : Princess Lettha

0 komentar:

:10 :11 :12 :13 :14 :15 :16 :17
:18 :19 :20 :21 :22 :23 :24 :25
:26 :27 :28 :29 :30 :31 :32 :33
:34 :35 :36 :37 :38 :39

Poskan Komentar

Related Posts Plugin for WordPress, Blogger...