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
查看全文
相关阅读:
Visual Studio 2015安装后没有C++ WIN32 console
ORACLE SEQUENCE用法
adoconnection断线重连
海康威视网络摄像机 SDK二次开发(JAVA)(1-DEMO测试)
FFmpeg,H.264,Directshow,和opencv及视频编码与封装格式
DirectShow 视频采集
CoCreateInstance运行原理
二叉树中序线索化
Xvid-Delphi
风冷冷藏库的化霜周期和化霜时间是多长?
原文地址:https://www.cnblogs.com/Dicky/p/131082.html
最新文章
PF_NETLINK类型建立的socket, 检测USB口
libssh.so中设置密码的接口函数
开源office
Linux中ssh登陆慢的两种原因
13. 散列表(中):如何打造一个工业级水平的散列表
FFmpeg编程(一)FFmpeg初级开发
FFmpeg学习(八)RTMP与FLV协议
FFmpeg学习(七)流媒体服务器搭建
FFmpeg学习(五)H264结构
FFmpeg学习(四)视频基础
热门文章
FFmpeg学习(三)音频基础
FFmpeg学习(二)FFmpeg命令学习
FFmpeg学习(一)FFmpeg安装与测试
libevent的使用
如何诊断Oracle Redo Log引发的性能问题
Oracle表分析
浅析函数防抖与函数节流
前端常见的跨域及解决办法
sql中的sp_helptext、sp_help 、sp_depends
VS2015没有win32位的控制台怎么办?
Copyright © 2011-2022 走看看