Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/08/2002, 09:01
Avatar de tilu
tilu
 
Fecha de Ingreso: agosto-2002
Ubicación: u-l-d-m
Mensajes: 1.885
Antigüedad: 21 años, 8 meses
Puntos: 5
Re: Cómo anular boton derecho del mouse?

<Script language=JavaScript>
function right(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
alert("mensaje para cuando presionen el boton");
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("mensaje para cuando presionen el boton");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
</script>


Debe ir entre <head> y </head>