请问:如何才能屏蔽掉web页面中的右键双击事件啊,谢谢!!!!

解决方案 »

  1.   

    <script>
            window.document.ondblclick = "javascript:void(null)";
    </script>
      

  2.   

    body里加上这一句
    oncontextmenu="return false"
      

  3.   

    脚本说明: 
     
    把如下代码加入<body>区域中
     <script language="JavaScript">
    function click(e) {
    if (document.all) {
    if (event.button==2||event.button==3) {
    oncontextmenu='return false';
    }
    }
    if (document.layers) {
    if (e.which == 3) {
    oncontextmenu='return false';
    }
    }
    }
    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    }
    document.onmousedown=click;
    document.oncontextmenu = new Function("return false;")
    </script>
      

  4.   

    <html>
    <head>
    <body>
    <script language="JavaScript">
    <!--
     
    if (window.Event) 
      document.captureEvents(Event.MOUSEUP); 
     
    function nocontextmenu() 
    {
     event.cancelBubble = true
     event.returnValue = false;
     
     return false;
    }
     
    function norightclick(e) 
    {
     if (window.Event) 
     {
      if (e.which == 2 || e.which == 3)
       return false;
     }
     else
      if (event.button == 2 || event.button == 3)
      {
       event.cancelBubble = true
       event.returnValue = false;
       return false;
      }
     
    }
     
    document.oncontextmenu = nocontextmenu;  // for IE5+
    document.onmousedown = norightclick;  // for all others
    //-->
    </script>
    点右键看看啊
    </body>
    </html>
    这个是整个右键屏蔽
      

  5.   

    <body oncontextmenu="return false">
      

  6.   

    <body  oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false" onmouseup="document.selection.empty()">鼠标全禁
      

  7.   

    就是这个<body oncontextmenu="return false">
      

  8.   

    确实存在鼠标右键双击事件啊,会弹出一个空白页,但不是<body oncontextmenu="return false">,也不是鼠标右键单击事件。
    帮忙up一下。
      

  9.   

    <script>
       window.document.ondblclick = "javascript:void(null)";
    </script>
      

  10.   

    <body oncontextmenu="return false">