ASP.NET网页经典代码(二)
2011-07-12 11:05
441 查看
<% if request("infoid")<>"" then set rs=conn.execute("select * from nproduct where id="&request("infoid")) if not (rs.eof and rs.bof) then proname=rs("proname") content=rs("proinfo")
end if rs.close set rs=nothing end if %>
end if rs.close set rs=nothing end if %>
8.永远都会带着框架 <script language="javascript"><!-- if (window == top)top.location.href = "frames.htm";// --></script> 说明:frames.htm为你的网页,这也是保护页面的一种方法 9.防止被人frame <SCRIPT LANGUAGE=javascript><!-- if (top.location != self.location)top.location=self.location; // --></SCRIPT> 10.网页将不能被另存为 <noscript><iframe src=*.html></iframe></noscript> 说明:<noscirpt>的用法很广,其中一条就是可以使JS广告失效。 11.查源文件 <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ '" target=_blank>http://www.e3i5.com/test.htm';"> 12.COOKIE脚本记录,有很大的用处哦 function get_cookie(Name) { var search = Name + "=" var returnvalue = ""; if (documents.cookie.length > 0) { offset = documents.cookie.indexOf(search) if (offset != -1) { // if cookie exists offset += search.length // set index of beginning of value end = documents.cookie.indexOf(";", offset); // set index of end of cookie value if (end == -1) end = documents.cookie.length; returnvalue=(documents.cookie.substring(offset, end)) } } return returnvalue; } function loadpopup(){ if (get_cookie('popped')==''){ openpopup() documents.cookie="popped=yes" } } 说明:以上是JS代码,请自己加起始符和结束符 |
相关文章推荐
- ASP.NET网页经典代码(一)
- ASP.NET网页经典代码(三)
- ASP.NET网页经典代码(五)
- ASP.NET网页经典代码(四)
- ASP.NET网页经典代码(六)
- ASP.NET(C#)经典采集代码
- ASP.NET抓取其他网页代码
- ASP.NET(C#)经典采集代码
- ASP.NET:一段比较经典的多线程学习代码
- 在asp.net网页中显示数学符号的代码
- Asp.net生成静态网页的实现代码
- Asp.net 网页中的嵌入式代码
- asp.net(C#) 远程获取网页内容代码分享
- ASP.NET抓取其他网页代码
- [代码]ASP.NET网页的跨页面发送
- ASP.NET抓取其他网页代码
- 在asp.net网页中显示数学符号的代码
- [代码]为ASP.NET网页编写嵌入式代码
- ASP.NET的网页代码模型及生命周期
- ASP.NET抓取其他网页代码【转】