思路:
查看演示效果
示例代码:
html.asp
<% Response.Expires = 0 Response.Expiresabsolute = Now() - 1 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "no-cache" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>查看代码 - www.51windows.Net</title> <style> <!-- td { font-family: Tahoma; font-size: 8pt; color: #000080; line-height: 150%; border: 1 solid #666666; padding: 4 } --> </style> </head> <body> <% session("haiwa") = "hw" %> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" width="480"> <tr> <td id="tmp"><SCRIPT LANGUAGE="JavaScript" src="js.asp" id="js"></SCRIPT></td> </tr> </table> </center> </div> </body> </html>
js.asp
<% Response.Expires = 0 Response.Expiresabsolute = Now() - 1 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "no-cache" if session("haiwa") <> "hw" then response.write "//欢迎查看源文件,www.51windows.Net" response.end end if %> //高,这你都能看得出来。我没有招了。。哈哈 document.write (" 先做后想,先想后做,边想边做;只想不做,只做不想,不想不做。------世界是几乎都被这六种人涵盖了,如果作为个人能清楚的分析并看出自己属于哪一类人,至少证明你自己是个聪明人。") <% session("haiwa") = "" %>