|
Bien esto esw muy facil, ya que es un codigo corto y simple.
colocalos entre <body> y <body>
bloquar el boton derecho:
<script language="JavaScript" type="text/JavaScript"> function click(){ if(event.button==2){ alert(' Tu modificas este alerta'); } } document.onmousedown=click //--> </script> |
bloquar el boton isquierdo:
<!-- botón izquierdo del mouse -->
<script language="javascript1.1">
<!-- adaptado por tk: compatible con ie y ns --> <!-- script original enviado por graciela -->
function izquierda(e) { if (navigator.appname == 'netscape' && (e.which == 1 || e.which == 2)){ alert('botón izquierdo inhabilitado') return false; }
else if (navigator.appname == 'microsoft internet explorer' && (event.button == 1)){ alert('botón izquierdo inhabilitado') } } document.onmousedown=izquierda </script> |
bloquar los dos juntos:
<script LANGUAGE="JavaScript1.1">
<!-- Adaptado por Tk: Compatible con IE y NS -->
<!-- Script -->
function ambos(e) { if (navigator.appName == 'Netscape' && (e.which == 1 || e.which == 3 || e.which == 2)){
return false; } else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 1 || event.button == 2)){
} } document.onmousedown=ambos </script>
|
|