方法1:
ASP禁止刷新当前页<%  
ASP禁止刷新当前页
Dim SplitReflashPage  
ASP禁止刷新当前页
Dim DoReflashPage  
ASP禁止刷新当前页
dim shuaxin_time  
ASP禁止刷新当前页DoReflashPage
=true  
ASP禁止刷新当前页shuaxin_time
=10  
ASP禁止刷新当前页ReflashTime
=Now()  
ASP禁止刷新当前页
if (not isnull(session("ReflashTime"))) and cint(shuaxin_time)>0 and DoReflashPage then  
ASP禁止刷新当前页
if DateDiff("s",session("ReflashTime"),Now())<cint(shuaxin_time) then  
ASP禁止刷新当前页response.write 
"<META http-equiv=Content-Type content=text/html; charset=gb2312><meta HTTP-EQUIV=REFRESH CONTENT=3>本页面起用了防刷新机制,请不要在<b><font color=ff0000>"&shuaxin_time&"</font></b>秒内连续刷新本页面<BR>正在打开页面,请稍候……"  
ASP禁止刷新当前页response.
end  
ASP禁止刷新当前页
else  
ASP禁止刷新当前页session(
"ReflashTime")=Now()  
ASP禁止刷新当前页
end if  
ASP禁止刷新当前页
elseif isnull(session("ReflashTime")) and cint(shuaxin_time)>0 and DoReflashPage then  
ASP禁止刷新当前页Session(
"ReflashTime")=Now()  
ASP禁止刷新当前页
end if  
ASP禁止刷新当前页
randomize timer  
ASP禁止刷新当前页regjm
=int(rnd*8998)+1000  
ASP禁止刷新当前页%
>

方法2:
ASP禁止刷新当前页<%  
ASP禁止刷新当前页
Dim URL  
ASP禁止刷新当前页
If DateDiff("s",Request.Cookies("oesun")("vitistime"),Now())<2 Then  
ASP禁止刷新当前页    URL
=Request.ServerVariables("Http_REFERER")  
ASP禁止刷新当前页    Response.Write(
"<meta http-equiv=""refresh"" content=""2;URL="&URL&""">")  
ASP禁止刷新当前页    Response.Write(
"防刷新,两秒后自动跳转ASP禁止刷新当前页")  
ASP禁止刷新当前页    Response.
End 
ASP禁止刷新当前页
End IF  
ASP禁止刷新当前页Response.Cookies(
"oesun")("vitistime")=Now()  
ASP禁止刷新当前页%
>

相关文章: