专业提供保姆式的H5响应式建站全包一套龙服务!

禁止保存网页的代码、禁止右键代码、禁止复制粘贴等网页代码

网页禁止保存代码为:
<noscript><iframe src="*.htm"></iframe></noscript>
 
本机ip<%=request.servervariables("remote_addr")%>
服务器名<%=Request.ServerVariables("SERVER_NAME")%>
服务器IP<%=Request.ServerVariables("LOCAL_ADDR")%>
服务器端口<%=Request.ServerVariables("SERVER_PORT")%>
 
网页禁止被缓存的代码 ASP
<%
Response.Expires = 0
Response.ExpiresAbsolute = Now() - 1
Response.CacheControl = "no-cache"
%>
 
1.将彻底屏蔽鼠标右键,无右键菜单
<body oncontextmenu="window.event.returnvalue=false">
 
也可以用于网页中Table框架中
<table border oncontextmenu=return(false)><td>no</table>
 
2.取消选取、防止复制
<body onselectstart="return false">
 
3.不准粘贴
<body onpaste="return false">
 
4.防止复制
<body oncopy="return false;" oncut="return false;">
 
5.IE地址栏前换成自己的图标
<link rel="Shortcut Icon" href="favicon.ico">
 
6.收藏夹中显示出你的图标
<link rel="Bookmark" href="favicon.ico">
 
7.关闭输入法
<input style="ime-mode:disabled">
 
说明:这段代码是在表格提交时用到的。也就是在输入数据时不可以使用其他输入法模式。
 
8.永远都会带着框架
 
<script language="javascript"><!--
if (window == top)top.location.href = "frames.htm";// --></script>9.防止被人frame
 
<SCRIPT LANGUAGE=javascript><!--
if (top.location != self.location)top.location=self.location;
// --></SCRIPT>
 
<input style="ime-mode:disabled">
 
9.查源文件
 
<input type=button value=查看网页源代码
onclick="window.location = 'view-source:'+ 'http://www.e3i5.com/test.htm';">
 
10.屏蔽功能键Shift,Alt,Ctrl
<script>
function look(){
if(event.shiftKey)
alert("禁止按Shift键!"); //可以换成ALT CTRL
}
document.onkeydown=look;
</script>
 
11.光标是停在文本框文字的后
<script language="java script">
function cc()
{
var e = event.srcElement;
var r =e.createTextRange();
r.moveStart("character",e.value.length);
r.collapse(true);
r.select();
}
</script>
<input type=text name=text1 value="123" onfocus="cc()">