Dec 11, 2010

Disable Right Klik kat blog kita

Ni saya nak ajar korng la cara tak bagi org tekan right klik kat blog kita ek, hehe ;D yg ni klau org right klik kat blog kita ada keluar pop out window punya la, caranya la,..


With pop-up messeage

Dashboard > Design > Add Gadget > HTML/javascript

Copy n pastekan kod ni kat HTML/javascript ek ;)

<script language=JavaScript>
<!--
//edit by unwanted

var message="Mesej apa-apa je :)";
///////////////////////////////////
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>


Masukkan mesej apa2 kat yg warna pink tu ek ;D ok dh abis smpai disini sajaha :) 


Without pop-up messeage


Copy paste code ni:



<script language=JavaScript>
<!--
//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.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>


lepas tu save je la. ok babai! 



8 comments:

aZa said...

mcm mn nak copy n paste..asal tekan je ada yaw :

Vanila98 said...

ctrl+c for copy n paste ctrl+v ^_^

Cornetto Blueberry said...

aww!! thx auw!! hehek. may ALLAH bless u

Vanila98 said...

@HaZiM

welcome bro, may allah bless you too ^_^

zaty said...

thank you :) da menjadi lahh. :)

Vanila98 said...

@zaty

ok :D

ANjournals said...

thanks ! menjadi :3

Vanila98 said...

@Diary Story

welcome :D