How to disable the right mouse button
Last
updated 5-31-03
Afraid
that someone's going to steal your site? Well ... did you know you can
disable their right mouse-button? This is supposed to make it harder to
copy things (pictures, especially). It will probably really annoy your
visitors.
Keep in mind ... disabling someone's computer could be considered an
insult as it implies that your visitors are thieves. It wouldn't really
deter the real culprits, anyway, as they can still hi-light and copy from
the menu bar.
I'm not sure where this particular javascript comes from as it was e-mailed
to me. Enjoy!
Example:
Try to determine the file-size of this picture by "right-clicking"
it!
Source
code ... add after first Body tag |
<SCRIPT language="JavaScript">
<!--
var
message="Dooh!! The right-click has been disabled on this page!";
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->
</SCRIPT> |
Or: See all our html
tricks!
|