1)添加javascript:
<script language="javascript">
<!--

<!--
function document.oncontextmenu()
{
return false;
}
-->
-->
</script>
  在要屏蔽的页面的body中添加:
   <body  oncontextmenu= "nocontextmenu()">

2)添加Javascript,到要屏蔽的页面
<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>  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2021-08-24
  • 2021-09-20
  • 2022-01-12
  • 2022-12-23
猜你喜欢
  • 2021-07-08
  • 2022-12-23
  • 2022-02-03
  • 2022-03-03
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
相关资源
相似解决方案