唐山网站建设

设为主页 加入收藏 繁體中文

ASP实例:Asp 避免网页频繁刷新1法

核心提示:ASP实例:Asp 避免网页频繁刷新1法

下面示例代码是避免用网页刷新过快,假设多个页面使用,最好将<%...%>代码存为1个asp文件,在需要的页面最前面include file使用。

以下为援用的内容:

<%
dim RefreshIntervalTime
RefreshIntervalTime = 3 '避免刷新的时间秒数,0表示不避免
If Not IsEmpty(Session("visit")) and isnumeric(Session("visit")) and int(RefreshIntervalTime) > 0 Then
if (timer()-int(Session("visit")))*1000 < RefreshIntervalTime * 1000 then
Response.write ("")
Response.write ("刷新过快,请稍候")
Session("visit") = timer()
Response.end
end if
End If
Session("visit") = timer()
%>


Asp 避免网页频繁刷新1法 - webjx.com





页面内容,页面内容

http://www.fw8.net/
TAG:内容,代码,网页,页面,频繁
评论加载中...
内容:
评论者: 验证码: