相关文章
·一些Asp技巧和实用解决方法· 常见的80004005错误及其解决方法
· 关于用宽带网上不去魔力的解决方法
· 《无冬之夜》使用秘籍后贴图错误的解决方法
· 《侠盗车手3》在WinXP下错误的完美解决方法
· 《仙剑奇侠传2》加密无法通过的解决方法
· len(),lift(),right()不能正常识别中文的解决方法
· NAV导致IIS调用FSO失败的解决方法
· ASP漏洞集-ASP漏洞分析和解决方法
· 常见的错误及其解决方法
· 一些Asp技巧和实用解决方法
· [图文] ASP漏洞分析和解决方法
· 《侠客英雄XP》乱码的解决方法
· 《极品飞车:最高通缉》DX9.0C安装错误解决方法
· 《极品飞车9》DX9错误解决方法
· 装石器的时候怎么弹出1607的解决方法?!

一些Asp技巧和实用解决方法

一些Asp技巧和实用解决方法
随机数:
<%randomize%>
<%=(int(rnd()*n)+1)%>
查询数据时得到的记录关键字用红色显示:
<% =replace(RS("字段X"),searchname,"<font color=#FF0000>" & searchname & "</font>") %>
通过asp的手段来检查来访者是否用了代理
<% if Request.ServerVariables("HTTP_X_FORWARDED_FOR")<>"" then
response.write "<font color=#FF0000>您通过了代理服务器,"& _
"真实的IP为"&Request.ServerVariables("HTTP_X_FORWARDED_FOR")
end if
%> 
判断上一页的来源
request.servervariables("HTTP_REFERER")
javascript: document.referrer
清除缓存,重新加载页面
<%response.expires = 0 
response.expiresabsolute = now() - 1
response.addHeader "pragma","no-cache"
response.addHeader "cache-control","private"
Response.cachecontrol = "no-cache"
%>
在下拉菜单中显示年和月
<select name="select">
<%
Dim M_Year 
Dim M_Month
Dim M_MonthJ
Dim M_TheMonth
Dim M_YM
For M_Year = 2000 To Year(Date) 
M_Month = 12 
If M_Year = Year(Date) Then 
M_Month = Month(Date) 
End If
For M_MonthJ=1 To M_Month
If M_MonthJ < 10 Then
M_TheMonth = "0" & M_MonthJ
Else
M_TheMonth = M_MonthJ
End If
M_YM = M_Year& "-" & M_TheMonth %>
<option value="<%= M_YM %>"><%= M_YM %></option>
<%
Next
Next %>
</select>
检索并删除数据库里的重复记录
conn.execute("delete from table where id not in (select distinct from table)")

一些Asp技巧和实用解决方法”来源与网络,版权归作者所有!
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 网站地图
Copyright © 2003--2006 网络下载. All Rights Reserved .