Tuesday, 16 August 2011

Tutorial : Disable right-click



Disable Right-Click????

macamana rupanya??

Ala... bile ada je makhluk yang right-click kat blog korang, 
maka keluarlah pesanan penaja seperti ini:



Camana nak buat???

Meh aku ajar...

*********************************************

1) Pergi ke Dashboard > Design > Add a gadget > HTML/JavaScript

2) Copy yang kat bawah ni (merah).


<script language=JavaScript>
<!--

//edit by unwanted


var message="TAIPKAN PESANAN PENAJA 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>


3) Paste ke dalam "HTML/JavaScipt".


4) Save > Save

*********************************************

Ok. Selesai....

p/s : Next time kalau aku rajin aku ajar korang camna nak elakkan korang punya entry di 'select' plak... ;)

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
 

JIHA's WORDS Copyright 2009 Sweet Cupcake Designed by Ipiet Templates Image by web hosting