TUTORIAL : DISABLE RIGHT CLICK WITH ALERT

Montela pernah ajar Disable Right Click kan?
Oke, yang tuh takde Alert.
Now, Montela nak ajar yang ada Alert punya.
Means, kalau orang Right Click, akan keluar macam kat bawah nih.





1. Dashboard > Design > Add New Gadget > HTML / Java Script

2. Copy dan Paste kod kat bawah nih dalam HTML / Java Script tadi.
<style>body {cursor:crosshair} </style>


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


var message="Ayat Uols";
///////////////////////////////////
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. Ayat Uols tuh uols create lah ayat sendiri oke.

Selamat Mencuba :)


Tiada ulasan:

DISCLAIMER: Comments are welcomed. However, noted that, tasteless and insulting comments may be deleted. Any personal remarks and attacks may be deleted. The same holds true for off-topic comment. Any comments that reek of link spam or marketing messages will be deleted.

I am not responsible for the content in comments other than those made by me, or in blogs, or other online content that I may link to.

Dikuasakan oleh Blogger.