Pisang Goreng Panas!!

Friday, November 4, 2011

Tutorial Blog : Disable Right Click Tanpa Alert

assalamualaikum. ni code utk disable right click tanpa ada alert. macam kat blog ni.
Design > Page Element > Add Gadget > HTML
<script language=javascript>
var message="right click disable";
///////////////////////////////////
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("return false")
// -->
</script>

0 comment(s) & talk(s) :

Post a Comment

Followers