Tutorial : Disable Right Click With No Message

Ana Myhusna | 17:36 | 0Comments |
Assalamualaikum!! Hey everyone! What's up! Cewah.. Okay! Kali ni, Ana nak ajar korang cara buat Disable Right Click tanpa mesej. Maksudnya, bila orang tekan right click, tapi tak keluar apa2 pon. Nothing's happen. Understand? Okay.. 
Blogskin
1. Go to Dashboard. Click Template.
2. Copy dan paste kod di bawah di bawah code <head>.
<script language=JavaScript>
<!--//Disable right mouse click Script
//By Dynamicdrive (renigade@nsimail.com)
//For full source code, visit http://www.dynamicdrive.com
var message="";
///////////////////////////////////
function clickIE4(){
if (event.button==2){return false;}}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){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>
Done! Preview and click save. Untuk yang menggunakan Template Designer, ikut tuto di bawah pula.
1. Go to Dashboard. Klik Design
2. Klik Add A Gadget
3. Then, pilih HTML/JAVASRICPT.
4. Copy dan pastekan kod di bawah dekat HTML/JAVASCRIPT tadi.
<script language=JavaScript>
<!--

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dauspozi.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>

Tuje lah! Kalau jadi komen.. Tak pon komen okayh? Hehe.. Assalamualaikum..

No comments: