根据查询的资料,得到两种比较好的方法

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>  

原文地址:https://www.cnblogs.com/kentyshang/p/697018.html