⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 防刷新机制.txt

📁 较为详细的介绍了asp自定义的各种函数,方便asp的各种开发.
💻 TXT
字号:
<% 
Dim SplitReflashPage 
Dim DoReflashPage 
dim shuaxin_time 
DoReflashPage=true 
shuaxin_time=10 
ReflashTime=Now() 
if (not isnull(session("ReflashTime"))) and cint(shuaxin_time)>0 and DoReflashPage then 
if DateDiff("s",session("ReflashTime"),Now())<cint(shuaxin_time) then 
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>正在打开页面,请稍候……" 
response.end 
else 
session("ReflashTime")=Now() 
end if 
elseif isnull(session("ReflashTime")) and cint(shuaxin_time)>0 and DoReflashPage then 
Session("ReflashTime")=Now() 
end if 
randomize timer 
regjm=int(rnd*8998)+1000 
%>


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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -