+ Reply to Thread
Results 1 to 7 of 7

Thread: Javascript - No permitir la acción del botón derecho del mouse

  1. #1
    naves's Avatar
    naves is offline x10Hosting Member naves is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Guanajuato
    Posts
    65

    Talking Javascript - No permitir la acción del botón derecho del mouse

    Este simplemente no permite el botón derecho.

    <script language="Javascript">
    <!-- Begin
    document.oncontextmenu = function(){return false}
    // End -->
    </script>

    Este además de no permitirlo muestra un mensaje.

    <script language="JavaScript">
    <!-- Begin
    function right(e) {
    var msg = " [ w w w.misitioweb.com ] ";
    if (navigator.appName == 'Netscape' && e.which == 3) {
    alert(msg); // Delete this line to disable but not alert user
    return false;
    }
    else
    if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
    alert(msg); // Delete this line to disable but not alert user
    return false;
    }
    return true;
    }
    document.onmousedown = right;
    // End -->
    </script>

    Con este lo castigas 10 clic's

    <script language="JavaScript">
    <!-- Begin
    function right(e) {
    var msg = " [ w w w.misitioweb.com ] ";
    if (navigator.appName == 'Netscape' && e.which == 3) {
    alert(msg); // Delete this line to disable but not alert user
    return false;
    }
    else
    if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
    alert(msg); // Delete this line to disable but not alert user
    return false;
    }
    return true;
    }
    document.onmousedown = right;
    // End -->
    </script>

    El script puede funcionar diferente, dependiendo del navegador.

  2. #2
    ZharkD's Avatar
    ZharkD is offline Retired ZharkD is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    MX
    Posts
    5,914

    Re: Javascript - No permitir la acción del botón derecho del mouse

    man, revisa los temas primero: http://forums.x10hosting.com/tutoria...-sus-webs.html XD


    salu2

  3. #3
    naves's Avatar
    naves is offline x10Hosting Member naves is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Guanajuato
    Posts
    65

    Re: Javascript - No permitir la acción del botón derecho del mouse

    Orales ya tenias recopilados varios javascript.
    Creo que dejare de postear sobre ello.

    Chido.

  4. #4
    vardor is offline x10Hosting Member vardor is an unknown quantity at this point
    Join Date
    Nov 2006
    Posts
    12

    Re: Javascript - No permitir la acción del botón derecho del mouse

    hoy en día se usan PESTAÑAS, que se abren con el BOTÓN DERECHO, así que no sean molestos poniendo esas cosas.
    Tienen que hacer que sus visitantes se sientan A GUSTO, no MOLESTARLOS.


    Saludos.

  5. #5
    ZharkD's Avatar
    ZharkD is offline Retired ZharkD is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    MX
    Posts
    5,914

    Re: Javascript - No permitir la acción del botón derecho del mouse

    yo creo que no es por molestar, mas bien es por proteccion de nuestro trabajo, en mi caso suelo usar el codigo sin alert, y los links los hago apra ke se habran en tora ventana, ys i tienes configurado tu ferefox bn, se abrira en otra pestaña ;)


    salu2

  6. #6
    alv4's Avatar
    alv4 is offline x10 Lieutenant alv4 is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    Bogotá - Colombia
    Posts
    323

    Post Re: Javascript - No permitir la acción del botón derecho del mouse

    Quote Originally Posted by vardor View Post
    hoy en día se usan PESTAÑAS, que se abren con el BOTÓN DERECHO, así que no sean molestos poniendo esas cosas.
    Tienen que hacer que sus visitantes se sientan A GUSTO, no MOLESTARLOS.


    Saludos.
    Yo digo lo mismo...
    además con el firefox.. en información de la pagina se puede coger la imagen.. asi que da igual... :S
    www.habboact.net Mi web Alojada en x10 ;)



  7. #7
    kraqen11's Avatar
    kraqen11 is offline Retired kraqen11 is an unknown quantity at this point
    Join Date
    Oct 2008
    Location
    En la Isla
    Posts
    997

    Re: Javascript - No permitir la acción del botón derecho del mouse

    si pero, ya sabia como usarlo, pero si te quieren copiar pueden utilizar editar
    My web: ociomaniacos

+ Reply to Thread

Similar Threads

  1. XML and Javascript
    By cuteboytm in forum Graphics & Webdesign
    Replies: 1
    Last Post: 09-21-2007, 10:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers