用Asp如何实现防止网页频繁刷新?
2018-09-06 12:39
<%
dimRefreshIntervalTime
RefreshIntervalTime=3防止刷新的时间秒数,0表示不防止
IfNotIsEmpty(Session(“visit“))andisnumeric(Session(“visit“))andint(RefreshIntervalTime)>0Then
if(timer()-int(Session(“visit“)))*1000<RefreshIntervalTime*1000then
Response.write(“<metahttp-equiv=““refresh““content=“““&RefreshIntervalTime&“““/>“)
Response.write(“刷新过快,请稍候“)
Session(“visit“)=timer()
Response.end
endif
EndIf
Session(“visit“)=timer()
%><!DOCTYPEHTMLPUBLIC“-//W3C//DTDHTML4.01Transitional//EN“>
<html>
<head>
<title>Asp如何防止网页频繁刷新-w
<metahttp-equiv=“Content-Type“content=“text/html;charset=gb2312“>
<linkrel=“stylesheet“type=“text/css“href=“style.css“>
<styletype=“text/css“>
</style>
</head>
<bodystyle=“background-color:#666666;font-size:36pt;font-family:黑体;color:#FFFFFF;“>
Asp如何防止网页频繁刷新-
</body>
</html>
上一篇:浏览文件夹下面所有图片
下一篇:exOf 方法介绍