Love Bloom
Official blog

Disable right click
Sunday, December 18, 2011 ϟ 0 letters

//Asalamualaikum. Mesti ramai yang dah tahu pasal tuto neh. Ada dua jenis disable right click . With alert and without alert.

With Alert 

1. Dashboard > Design > HTML JAVASCRIPT
2. Copy code bawah ini and paste kat HTML JAVASCRIPT


<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="Function Disabled!";
///////////////////////////////////
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>
 Korang tukar tulisan warna merah dengan ayat korang sendiri. Contoh : AWAK CURI SAYA REPORT MAK SAYA or anything yang korang nak.

Without Alert


1. Dashboard > Design > HTML JAVASCRIPT
2. Copy code bawah ini and paste kat HTML JAVASCRIPT


<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> 
Senang tak ? Kalau tak faham lagi, comment sangat dialu-alukan ^^

« Past | New »