当前位置: 首页 > 图文教程 > 网络编程 > ASP > asp防止刷新功能

ASP
如何在 Access 2003 和 Access 2002 中创建 DSN 的连接到 SQLServer 对链接表
值得收藏的一些HTML、JavaScript、ASP代码
Asp遍历服务器对象的代码
保证asp叶面一定不会出现乱码 UTF8
ASP 非法字符过滤函数
ASP FSO文件处理函数大全
asp 常用函数用法
文章内页类
Asp类 的数据库领域
ASP ACCESS 日期操作语句小结 By Stabx
经典的分页完整程序+注释
vbcrlf的意思
js+asp总结
解决rs.absolutepage=-1的问题
ASP实现URL编码
FileSystemObject 对象
写入文本文件的过程函数(ASP)
FSO的强大功能
FSO 读出TXT文件
不用模板,只用ASP+FSO生成静态HTML页的一个方法

ASP 中的 asp防止刷新功能


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 49 ::
收藏到网摘: n/a

asp防止刷新
复制代码 代码如下:

Sub chkreflash()
dim ScriptName
ScriptName=lcase(request.ServerVariables("PATH_INFO"))
dim posttime,DoReflashPage,ReflashPage,SplitReflashPage
posttime=1 '防止刷新时间
DoReflashPage=false
ReflashPage="|Article_one.asp"
SplitReflashPage=split(ReflashPage,"|")
for i=0 to ubound(SplitReflashPage)
if instr(scriptname,SplitReflashPage(i))>0 then
DoReflashPage=true
exit for
end if
next
if (not isnull(session("ReflashTime"))) and posttime>0 and DoReflashPage then
if DateDiff("s",session("ReflashTime"),Now())<posttime then
call msg("警告!系统已记录您的IP,和刷新次数。\n\n请不要在"&posttime&"秒内连续刷新本页面!","-1")
else
session("ReflashTime")=Now()
end if
elseif isnull(session("ReflashTime")) and posttime>0 and DoReflashPage then
Session("ReflashTime")=Now()
end if
End Sub

调用方法在页面首部加入chkreflash即可