Friday, 15 February 2013

Disable Right Click with Alert Message



Disable Right Click In Blogger/Blogspot Blog

Okay, tapi blog ini memang takde benda ni.
Sebab nanti orang len susah nak copy. 
Sebelum tu, Gambar diambil dari Google tau!
Cara dia sama je :D 

1. Blogger > Layout > Add a Gadget > HTML/Javascript

                                             

2. Copy code dibawah ni:-
<script language="javascript">
<!--

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="No Right Click Okay.";

///////////////////////////////////
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>
3. Paste code tadi dekat HTML/Javascript

                                                
4. Save

!Warna merah tu tukar dengan ayat sendiri!

No comments: