互联网页面浏览限制实现总结 (2)
来源:岁月联盟
时间:2005-11-18
<body oncontextmenu="window.event.returnValue=false" onkeypress="window.event.returnValue=false" onkeydown="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"onmouseup="document.selection.empty()">
4.避免别人把网页放在框架中
<script language=“javascript”><!--if (self!=top){top.location=self.location;}-->< /script>
5.禁示查看源代码
<frameset> <frame src="你要保密的文件的URL"> </frameset>
6.关闭输入法
<input style="ime-mode:disabled">
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">
上一篇:循序渐进学做留言簿-概述