本文主要是介绍ASP防止刷新,效果很实用啊,。,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
<%
Sub chkreflash()
dim ScriptName
ScriptName=lcase(request.ServerVariables("PATH_INFO"))
dim posttime,DoReflashPage,ReflashPage,SplitReflashPage
posttime=86400 '防止刷新时间
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
response.Redirect(syurl)
else
session("ReflashTime")=Now()
end if
elseif isnull(session("ReflashTime")) and posttime>0 and DoReflashPage then
Session("ReflashTime")=Now()
end if
End Sub
%>
这篇关于ASP防止刷新,效果很实用啊,。的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!