Tutorial : Disabled Right Click with Message
20 March 2011 11:59 AM 0 comments
Helloooo :) This time nak buad tuto disabled right click with message . Macam mane bnd alah tuh ? Try tekan right click dkat blog neh . Hahaha yg *Ohoi ! Tade right click eh ? :P* tuh lah message nye ;) Jum mula !
1. Pegi Dashboard > Design > Add a gadget > HTML/javascript .
2. Paste code kat bawah neh dkat dlam content HTML/javascript tuh .
<script language=javascript><!--3. Tukar messagekorang dgan ayat yg korang nak .
//edit by unwanted
var message="messagekorang";
///////////////////////////////////
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>
4. Then save !