.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
<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
<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" >
$("body").load("123.mht");
//$("body").html("123.mht");
document.title = window.name;
});