用户登录
用户注册

分享至

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

  • 作者: 逗比男神你建哥
  • 来源: 51数据库
  • 2021-08-17
<%
    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=utf-8“>
    <link rel=“stylesheet“ type=“text/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>
软件
前端设计
程序设计
Java相关