TUTORIAL : disable right click



malam ni princess teddy nak buat tuto pasal disable right click . nanti kalau ada2 copycat yang maw copy apa2 dari blog korang , tekan ja right click akan keluar window baru kasi amaran keras . huhu

cara2nya senang jaa...

:135: dashboard :65: design :65: add a gadget :65: HTML/javascript


:135: then , copy and paste kan code bawah 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="HEYP ! babap karang ! :D";

///////////////////////////////////
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>

ok done :q: yang di bold kan tu korang boleh tukar letak ayat sendiri . as simple as kunyah kek coklat :face34: . heheh . then , save lah ape lagi kan .

1 comment:

Sila tinggalkan komen anda.. =)