常用ASP。NET技巧

1. oncontextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键

1<table border="" oncontextmenu="return(false)"><td>no</td></table>

可用于Table
2.

 1<body onselectstart="return false"> 取消选取、防止复制   
 2  
 33\. onpaste="return false" 不准粘贴   
 4  
 54\. oncopy="return false;" oncut="return false;" 防止复制   
 6  
 75\. <link href="favicon.ico" rel="Shortcut Icon"/> IE地址栏前换成自己的图标   
 8  
 96\. <link href="favicon.ico" rel="Bookmark"/> 可以在收藏夹中显示出你的图标   
10  
117\. <input style="ime-mode:disabled"/> 关闭输入法   
12  
138\. 永远都会带着框架   
14<script language="javascript"><!--   
15if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页   
16// --></script>   
17  
189\. 防止被人frame   
19<script language="javascript"><!--   
20if (top.location != self.location)top.location=self.location;   
21// --></script>   
22  
2310\. <noscript><iframe src="*.html"></iframe></noscript> 网页将不能被另存为   
24  
2511\. <input onclick="window.location = 'view-source:'+ '  http://www.csdn.net/'" type="button" value="查看网页源代码"/>   
26  
2712\. 怎样通过asp的手段来检查来访者是否用了代理   

if Request.ServerVariables("HTTP_X_FORWARDED_FOR")&lt;&gt;"" then
response.write "<font color="#FF0000">您通过了代理服务器,"&amp; _
"真实的IP为"&amp;Request.ServerVariables("HTTP_X_FORWARDED_FOR")
end if

Published At
Categories with Web编程
Tagged with
comments powered by Disqus