当前位置: 首页 > 图文教程 > 网络编程 > ASP > 用Asp如何实现防止网页频繁刷新?

ASP
asp数个使用技巧
存储过程里的递归 实现方法
非常不错的列出sql服务器上所有数据库的asp代码
防范ASP木马的十大基本原则强列建议看下
雷客图ASP站长安全助手的ASP木马查找功能
防止别人盗链的好方法推荐
图片的入库与读取的方法
用asp实现无组件生成验证码的方法2种
用asp实现检测文件编码
[asp]怎么添加验证码的解决方法
ASP文章系统解决方案实现上一页下一页
ASP编程入门进阶(三):接触脚本程序
ASP编程入门进阶(四):内置对象Request
ASP编程入门进阶(五):内置对象Response
ASP编程入门进阶(六):Cookies讲座
ASP编程入门进阶(八):内置对象Session
ASP编程入门进阶(九):内置对象Application
ASP编码优化技巧8则
ASP编程入门进阶(十):Global.asa文件
ASP编程入门进阶(十一):Chat聊天程序

ASP 中的 用Asp如何实现防止网页频繁刷新?


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

<%
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 (“<meta http-equiv=““refresh““ content=“““& RefreshIntervalTime &“““ />“)
Response.write (“刷新过快,请稍候“)
Session(“visit“) = timer()
Response.end
end if
End If
Session(“visit“) = timer()
%><!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN“>
<html>
<head>
<title>Asp如何防止网页频繁刷新-wwww.zhangpeng.com.cn</title>
<meta http-equiv=“Content-Type“ content=“text/html; charset=gb2312“>
<link rel=“stylesheet“ type=“text/css“ href=“style.css“>
<style type=“text/css“>
</style>
</head>
<body style=“background-color:#666666;font-size:36pt;font-family:黑体;color:#FFFFFF;“>
Asp如何防止网页频繁刷新-www.zhangpeng.com.cn
</body>
</html>