即使不用右键,也可以同过IE的“查看”->“源文件”。
怎么禁用IE的部分菜单?

解决方案 »

  1.   

    可以把右键ie的菜单屏蔽掉,然后自己加一个菜单,
    至于ie->查看->源文件,干脆把菜单去掉,这样连另寸为都没有了!
      

  2.   

    你的网页用iframe做吧
    这样不用禁右键,别人也较难找出你的源码..
      

  3.   

    <body oncontextmenu="return false;">
      

  4.   

    <script>
    function clickButton(){
       if(event.button!=1) alert(".....");
    }
    document.onmousedown=clickButton;
    </script>
      

  5.   

    nne998這個方法要ie5以上版本才能生效
      

  6.   

    <body oncontextmenu="return false;">
    现在哪个还是ie5以下的啊,如果是,他也土不会去看源代码了,
      

  7.   

    <SCRIPT language=JavaScript>
    function click() 
    {
    if (event.button==2) {alert('欢迎访问') }
    }
    document.onmousedown=click
    </SCRIPT>
      

  8.   

    <body oncontextmenu="return false">
      

  9.   

    不就是看源码吗?
    我大不了不用ie来看,我用flashget来down!不过这个文章问的是怎么真正实现 禁用鼠标右键
      

  10.   

    何必呢,又想隐藏HTML源代码???
    你隐藏得了吗??我去telnet你的80端口
    只接拿页面代码来看,你能怎么防我?有时间去考虑一下其他的东西
    比在这个上面浪费时间好。
      

  11.   

    Shift+F10也是可以弹出菜单的!
    我把你想要的都想到了,试试吧。<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><noscript>
    <meta http-equiv="refresh" content="0;url=about:noscript">
    </noscript><title>屏蔽鼠标右键、Ctrl+n、shift+F10、F5刷新、退格键</title>
    </head>
    <body onkeydown="KeyDown()" onbeforeunload="location=location"
    oncontextmenu="event.returnValue=false"><script language="Javascript"><!--
      //屏蔽鼠标右键、Ctrl+n、shift+F10、F5刷新、退格键
      //Author: meizz(梅花雨) 2002-6-18function KeyDown(){
      if ((window.event.altKey)&&
          ((window.event.keyCode==37)||   //屏蔽 Alt+ 方向键 ←
           (window.event.keyCode==39))){  //屏蔽 Alt+ 方向键 →
         alert("不准你使用ALT+方向键前进或后退网页!");
         event.returnValue=false;
         }     /* 注:这还不是真正地屏蔽 Alt+ 方向键,
         因为 Alt+ 方向键弹出警告框时,按住 Alt 键不放,
         用鼠标点掉警告框,这种屏蔽方法就失效了。以后若
         有哪位高手有真正屏蔽 Alt 键的方法,请告知。*/  if ((event.keyCode==8)||            //屏蔽退格删除键
          (event.keyCode==116)){          //屏蔽 F5 刷新键
         event.keyCode=0;
         event.returnValue=false;
         }
      if ((event.ctrlKey)&&(event.keyCode==78)){   //屏蔽 Ctrl+n
         event.returnValue=false;
         }
      if ((event.shiftKey)&&(event.keyCode==121)){ //屏蔽 shift+F10
         event.returnValue=false;
         }
      }
     /* 另外可以用 window.open 的方法屏蔽 IE 的所有菜单
    第一种方法:
      window.open("你的.htm", "","toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=yes,status=no,top=0,left=0")
    第二种方法是打开一个全屏的页面:
      window.open("你的.asp", "", "fullscreen=yes")
     */
    // --></script>
    <h2 align=center>屏蔽鼠标右键、Ctrl+n、shift+F10、F5刷新、退格键</h2>
    </body>
    </html>
      

  12.   

    右邊的ctrl和alt之間的靠近ctrl的那個健呢?我建議沒有必要在這方面花這麽大的功夫
      

  13.   

    在某个网页上看到如下代码: (不能使用右键了)<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>