Code
網頁禁止儲存代碼為:
<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.關閉IME
<input style="ime-mode:disabled">
說明:這段代碼是在表格提交時用到的。也就是在輸入資料時不可以使用其他IME模式。
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()">
轉載自:http://www.cnblogs.com/ZHF/articles/1407045.html