Umeng’s Blog


Mencegah klik kanan pada website
March 23, 2009, 9:39 am
Filed under: Disain & Pemrograman Web

Tambahkan kode javascript berikut ini diantara tag <head> dan </head> halaman web Anda untuk mendisable klik kanan. Sebagai contoh lihat di sini.

<script language=”JavaScript”>
<!–
var popup=”Sorry ya !!!\n\nThis Site Copyright
©2000″;
function noway(go) {
if (document.all) {
if (event.button == 2) {
alert(popup);
return false;
}
}
if (document.layers) {
if (go.which == 3) {
alert(popup);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=noway;
// –> </script>

Advertisements

Leave a Comment so far
Leave a comment



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s



%d bloggers like this: