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
查看全文
相关阅读:
(转) tcp的注册端口
[转] Android中C&C++源码库的初步研究
(转)vim7.3中文乱码解决方法
{转} Eclipse 高亮显示选中的相同变量
libcurl 一个实现了client请求http,ftp的库
c#操作文件夹
OutputCache祥解
非静态的字段、方法或属性“System.Web.UI.Page.ClientScript.get”要求对象引用
IXMLDOMDocument 成員
关于中日文和UNICODE之间编码的转换(2008725 15:05:00)
原文地址:https://www.cnblogs.com/Dicky/p/131082.html
最新文章
【转】利用xml开发新闻发布系统(C#)
【转】如何自动关闭无响应程序
【技术贴】Media player打不开提示文件 wmp.dll 的版本号为 11.0.5721.5
cmd批处理一闪而过一下子就消失了打不开的解决办法
【转】网页html+css样式各类常用小结
大学易站专业郑州市大学生二手交易平台!
【转】Cheat Engine TUTORIAL 教程 (8个步骤)【转】
【技术贴】Media player打不开提示文件 wmp.dll 的版本号为 11.0.5721.5
【转】美国NASA致力研究超光速引擎,具备可能性
大学易站专业郑州市大学生二手交易平台!
热门文章
Visual Studio Tip 之 如何在编辑器中显示行号
什么是TDS协议?
NetMon中的Stub Parsers的概念
三类访问SharePoint时弹认证框的问题
SharePoint中的列表(List) 与Content Type 之四
Visual Studio Tip 之 如何查看隐形的空格(white space)和制表符(tab)
Microsoft NTLM认证简介
SharePoint Variation 初步
SharePoint中的列表(List) 与Content Type 之五
一些要看的东西
Copyright © 2011-2022 走看看