zoukankan
html css js c++ java
ASP禁止刷新当前页
方法1:
<
%
Dim
SplitReflashPage
Dim
DoReflashPage
dim
shuaxin_time
DoReflashPage
=
true
shuaxin_time
=
10
ReflashTime
=
Now
()
if
(
not
isnull
(session(
"
ReflashTime
"
)))
and
cint
(shuaxin_time)
>
0
and
DoReflashPage
then
if
DateDiff
(
"
s
"
,session(
"
ReflashTime
"
),
Now
())
<
cint
(shuaxin_time)
then
response.write
"
<META http-equiv=Content-Type content=text/html; charset=gb2312><meta HTTP-EQUIV=REFRESH CONTENT=3>本页面起用了防刷新机制,请不要在<b><font color=ff0000>
"
&
shuaxin_time
&
"
</font></b>秒内连续刷新本页面<BR>正在打开页面,请稍候……
"
response.
end
else
session(
"
ReflashTime
"
)
=
Now
()
end
if
elseif
isnull
(session(
"
ReflashTime
"
))
and
cint
(shuaxin_time)
>
0
and
DoReflashPage
then
Session(
"
ReflashTime
"
)
=
Now
()
end
if
randomize
timer
regjm
=
int
(
rnd
*
8998
)
+
1000
%
>
方法2:
<
%
Dim
URL
If
DateDiff
(
"
s
"
,Request.Cookies(
"
oesun
"
)(
"
vitistime
"
),
Now
())
<
2
Then
URL
=
Request.ServerVariables(
"
Http_REFERER
"
)
Response.Write(
"
<meta http-equiv=""refresh"" content=""2;URL=
"
&
URL
&
"
"">
"
)
Response.Write(
"
防刷新,两秒后自动跳转
"
)
Response.
End
End
IF
Response.Cookies(
"
oesun
"
)(
"
vitistime
"
)
=
Now
()
%
>
青苹果Web应用商店
https://webapp.taobao.com/
PHP/ASP.NET/ASP/UCHOME/DISCUZ! X系列网站开发,详细需求联系
QQ:8511978
查看全文
相关阅读:
Gitlab 自动化部署 + 局域网访问 gitlab pages
Gitlab 跨版本升级
Gitlab 私有化管理 npm 包
Postman-请求加密和设置 Cookie
menuStrip鼠标滑过自动弹出
JAVA实用案例之文件导入导出(POI方式)
springboot npoi 合并单元格 之后设置单元格居中
postman测试导出Excel接口
Application.DoEvents()的作用
设置WINFORM窗体及程序图标
原文地址:https://www.cnblogs.com/Dicky/p/131082.html
最新文章
一段Java代码是如何执行的?
HashMap
TPS、QPS、RT等名词概念
Java 线程池的实现原理
Synchronized关键字
JAVA中的异常
Leetcode 1190. 反转每对括号间的子串
腾讯笔试题20210321
2021寒假每日一题《回文日期》
2021寒假每日一题《明明的随机数》
热门文章
2021寒假每日一题《不高兴的津津》
2021寒假每日一题《陶陶摘苹果》
2021寒假每日一题《数列》
2021寒假每日一题《ISBN号码》
2021寒假每日一题《a^b》
2021寒假每日一题《献给阿尔吉侬的花束》
数据随机分组程序
小程序画一个环形图( Doughnut)
【踩坑】使用自定义组件库引入 css 样式无效
"gyp ERR! build error"
Copyright © 2011-2022 走看看