· 信息发布
· 广告联系
· 联系站长
动态空间 | 静态空间 | 免费域名 | 免费邮箱 | 免费论坛 | 流量统计 | 免费QQ信息 | 免费硬盘 | 中奖赚钱赠品 | 免费博客 | 免费相册 | 免费翻译 | 免费广告
免费帐号 | 免费留言本 | 免费聊天室 | 免费电话短信 | 免费游戏相关 | 免费杀毒软件 | 更多免费 | 免费影音 | 网站运营 | 网络编程 | 联盟资讯 | 网站制作
推荐资源
24小时热门资源
特别推荐
一周热门资源
信息阅读

ASP实例:Asp 防止网页频繁刷新一法


来源:网络 编辑:blmbolon 日期:2008-1-30 0:56:01 人气:
 
更多免费资源请关注久留免费网:http://www.96ew.com/

:久留网

下面示例代码是防止用网页刷新过快,如果多个页面使用,最好将<%...%>代码存为一个asp文件,在需要的页面最前面include file使用。

Www_96ew_com

以下为引用的内容:

<%
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 防止网页频繁刷新一法 - webjx.com</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;">
页面内容,页面内容
</body>
</html>

Www@96ew@com

中国久留网

 如果您发现本免费资源已过期,请点击报告错误提交过期信息,谢谢!

  • 上一篇文章:

  • 下一篇文章:

  •   关键字:AS,SP,P实,实例,例:,:A,As,sp,p防,防止,止网,网页,页频,频繁,繁刷,刷新,新一
    久留免费网