用Asp如何實(shí)現(xiàn)防止網(wǎng)頁(yè)頻繁刷新?
更新時(shí)間:2006年12月21日 00:00:00 作者:
<%
dim RefreshIntervalTime
RefreshIntervalTime = 3 '防止刷新的時(shí)間秒數(shù),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 (“刷新過(guò)快,請(qǐng)稍候“)
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如何防止網(wǎng)頁(yè)頻繁刷新-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如何防止網(wǎng)頁(yè)頻繁刷新-www.zhangpeng.com.cn
</body>
</html>
dim RefreshIntervalTime
RefreshIntervalTime = 3 '防止刷新的時(shí)間秒數(shù),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 (“刷新過(guò)快,請(qǐng)稍候“)
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如何防止網(wǎng)頁(yè)頻繁刷新-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如何防止網(wǎng)頁(yè)頻繁刷新-www.zhangpeng.com.cn
</body>
</html>
您可能感興趣的文章:
- asp防止刷新功能實(shí)現(xiàn)代碼
- ASP.Net防止刷新自動(dòng)觸發(fā)事件的解決方案
- ASP.Net中防止刷新自動(dòng)觸發(fā)事件的解決方案
- asp.net防止刷新時(shí)重復(fù)提交(可禁用工具條刷新按鈕)
- Asp.Net防止刷新重復(fù)提交數(shù)據(jù)的辦法
- ASP.NET防止頁(yè)面刷新的兩種解決方法小結(jié)
- php環(huán)境下利用session防止頁(yè)面重復(fù)刷新的具體實(shí)現(xiàn)
- php防止網(wǎng)站被刷新的方法匯總
- PHP防止刷新重復(fù)提交頁(yè)面的示例代碼
- php采用session實(shí)現(xiàn)防止頁(yè)面重復(fù)刷新
- ASP.NET中防止頁(yè)面刷新造成表單重復(fù)提交執(zhí)行兩次操作
相關(guān)文章
asp實(shí)現(xiàn)防止站外提交內(nèi)容的兩個(gè)方法
asp實(shí)現(xiàn)防止站外提交內(nèi)容的兩個(gè)方法...2007-01-01
127.0.0.1無(wú)法訪問(wèn),沒(méi)有權(quán)限: GetObject
127.0.0.1無(wú)法訪問(wèn),沒(méi)有權(quán)限: GetObject...2007-02-02
asp實(shí)現(xiàn)批量錄入數(shù)據(jù)的實(shí)現(xiàn)
asp實(shí)現(xiàn)批量錄入數(shù)據(jù)的實(shí)現(xiàn)...2006-12-12
ASP 中使用 HTTP 協(xié)議發(fā)送參數(shù)詳解
ASP 中使用 HTTP 協(xié)議發(fā)送參數(shù)詳解...2006-12-12
Eval 函數(shù) | Execute 語(yǔ)句 | ExecuteGlobal 語(yǔ)句使用說(shuō)明
在運(yùn)行時(shí)添加過(guò)程和類是非常有用的,但是也可能導(dǎo)致在運(yùn)行時(shí)覆蓋已有的全局 變量 和函數(shù)。因?yàn)檫@可能導(dǎo)致非常嚴(yán)重的程序問(wèn)題,因此,當(dāng)使用 ExecuteGlobal 語(yǔ)句時(shí)一定得非常謹(jǐn)慎。2007-02-02
ASP中Request對(duì)象獲取客戶端數(shù)據(jù)的順序(容易忽略)
ASP中Request對(duì)象獲取客戶端數(shù)據(jù)的順序(容易忽略)...2006-08-08

