IZZAHASHARI[DOT]BLOGSPOT[DOT]COM

Friday, 27 January 2012

Tutorial : Disable Right Click With Alert Message.

Haha , korunk mesti tengah update blog betul kan ???
Jom lah kita tengok request dari sahabat Izzah ni :)
Dia kata tolong dengan dia punya Disable Right Click ??
Maksudnya , dia nak tahu macam mana nak buat 
Disable Right Click.

Meh Izzah ajarkan ye ???
Ikot step di bawahh : 

1.Log in > Dashboard > Design > Add Gadget > HTML/JavaScript.

2.Copy coding kat bawah ni and Paste kat ruangan HTML tu...



<script language=JavaScript>
<!--

//edit by unwanted


var message="Masukkan Mesej Anda 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>

Cuma yang WARNA PINK tu je tukarkan dengan ayat korunk okay ??

3.Da Siap ?? SAVE laa !!

-SELAMAT MENCUBA-

0 Comments:

Post a Comment

LinkWithin

Related Posts Plugin for WordPress, Blogger...
This blog fully designed by IZZAHASHARI | Dont copy my tutorials or my entries ! | Alright reserved by IzzahAshari