互联网页面浏览限制实现总结 (2)
<body oncontextmenu="window.event.returnValue=false" onkeypress="window.event.returnValue=false" onkeyup="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false">... </body>
3.禁止页面正文内容被选取
<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false">
4.避免别人把网页放在框架中
<script language=“javascript”><!--if (self!=top){top.location=self.location;}-->< /script>
5.禁示查看源代码
<frameset> <frame src="你要保密的文件的URL"> </frameset>
6.关闭输入法
<input>
7.禁止图片下载
在这里的最后加入:
oncontextmenu="return false" ondragstart="return false" onselectstart="return false" scroll="auto"
8.禁止缓存
在HEAD里加入:
<meta http-equiv="Expires" CONTENT="0"> <meta http-equiv="Cache-Control" CONTENT="no-cache"> <meta http-equiv="Pragma" CONTENT="no-cache">
