Tutorial: Disabled Right-Click

| On
9:48:00 PM

dan selamat sejahtera.. hehhe tutorial lagi, tutorial yg lepas tentang cara-cara buat simple banner kan? amacam? korang dah try? jadi ke tidak? kalu tak jadi, teruskan usaha ya..

ok, now we go through our topic, Tutorial: Disabled Right-Click.. hari nie Amni nak buat 2 in 1 tutorial.. means 2 jenis disabled right-click dlm 1 page.

Jenis Pertama: Tutorial Disabled Right-Click without Alert Message

1. Dashboard > Design >Page Element > Add Gadget >Pilih Edit HTML/Javascript

2. Copy code yg Amni bg kat bawah nie, and pastekan dekat ruang Edit HTML/Javascript tu..
<script language=JavaScript> <!--//Disable right click script III- By Renigade (renigade@mediaone.net)//For full source code, visit http://www.dauspozi.comvar 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> 

3. Save, dan lihat hasilnya (:

Jenis Kedua: Tutorial Disabled Right-Click with Alert Message

with alert message tu maksudnya ada benda nie;

*ni la alert message..
1. Dashboard > Design >Page Element > Add Gadget >Pilih Edit HTML/Javascript

2. Copy code yg Amni bg kat bawah nie, and pastekan dekat ruang Edit HTML/Javascript tu..

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

var message="Masukkan Mesej Anda Disini";
///////////////////////////////////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>
* MERAH: korang tulis lah apa yg korang nk tulis, contoh mcm Amni punya tu..

3. Save and Dah siap.. lihat hasilnya :)

ok lah, sampai d'sini sahaja..





1 comment on "Tutorial: Disabled Right-Click"