.mht文件通过iframe嵌入到父页面进行显示,现在能够屏蔽掉父页面的右键菜单,如何才能够屏蔽掉这个.mht文件的右键菜单呢?<html>
<head>
    <title>在线浏览</title> 
    <script type="text/javascript">                                                                                 
    $().ready(function () { $(document).bind("contextmenu", function () { return false; }); alert("happy me"); $(document).bind("selectstart", function () { return false; }); $(document).keydown(function () { return key(arguments[0]) }); }); 
      </script>
</head>
<body oncontextmenu='self.event.returnValue=false'  ondragstart='return false'  onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforecopy='return false' onmouseup='document.selection.empty()' onselectstart="return false" >
 <iframe   border="0" id="DeptFrame" name="DeptFrame" marginwidth="1" marginheight="1" src="../../<%=.mht文件路径 %>"
 frameborder="0" width="100%" height="100%" bordercolor="#EDEDED" scrolling="no">
 </iframe>            
</body>
</html>
HTMLcontextmenu

解决方案 »

  1.   

    <iframe> 不要直接引用你的目标mht,    而先引用另一个页面 b ,在b页面的body中加载你的目标mht然后在这个b页面的body上
    <body oncontextmenu='self.event.returnValue=false'  ondragstart='return false'  onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforecopy='return false' onmouseup='document.selection.empty()' onselectstart="return false" >
      

  2.   

    那b页面应该怎么加载呢? 我这样子加载出来全是乱码啊  $(function () {
                $("body").load("123.mht");
                //$("body").html("123.mht");
                document.title = window.name;
            });