Funzione che disabilita il tasto destro del mouse.
<HTML><HEAD><TITLE>titolo</TITLE>
<SCRIPT language=JavaScript1.1>
<!-- Original: Martin Webb (martin@irt.org) -->
<!-- Begin
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Mouse destro disabilitato")
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
// End -->
</SCRIPT>
</HEAD>
<BODY vLink=red>
<CENTER><FONT face=ARIAL color=#004080 size=4><B>Testa la demo,
clicca con il
tasto destro del mouse!</B></FONT>
<SCRIPT LANGUAGE?JavaScript1.1?>
<!-- Begin
for (var i=0; i<document.images.length; i++)
document.images[i].onmousedown=right;
for (var i=0; i<document.links.length; i++)
document.links[i].onmousedown=right;
// End -->
</SCRIPT>
</CENTER>
</BODY>
</HTML>
![]()