Blog Afiq Ikmal : Tutorial 2: Disable right click

Jom terjah entry yang lain

22 January 2013

Tutorial 2: Disable right click

Hye...nak try buat tuto but ni tuo no 2 sebab tuto no 1 amik yang timbang berat blog tu yer...

Ok we start tutor nih...


Camtu lah nampak tak bila korang click right click dia akan keluar camtuh yer...

1.Log in blogspot

2.Klik layout >HTML/Javascript

3.Copy kod nih 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="Errkkk nak buat apa tuh?"; /////////////////////////////////// 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>

4.Yang merah boleh guna perkataan sendiri.

5.Dah paste save yer...

Jadi tak huhuhu first time...Bye

3 comments:

miLa said...

salam adik afiq..akak dah try tapi x jadi..huhu.. mcm mane ye??

afiq ikmal said...

kejap yer nak test baru first time hehee

miLa said...

ow..oke. mekaseh :)

Related Posts Plugin for WordPress, Blogger...