设为首页
加入收藏
帮助中心
首页 | 红盾通告 | 信息中心 | ASP技术 | 数据库 | 网页设计 | 网管专栏 | OICQ攻略 | 墨客频道 | 网站运营 |
当前位置:首页 >> ASP技术 >> ASP技巧 >> 正文
最新信息
·ASP防止采集的代码
·文字防复制乱码
·关于ASP中的UTF8编码
·ASP精典之常用函数收集
·用正则式除去HTML标记
·ASP国际化多语言详细方案
·改进 ASP 的字符串处理性能
·ASP缓存技术
·巧用ASP技术保护DHTML源代…
·ASP读取系统时区的错误行为…
资料搜索
热点信息
·删除数组中的重复元素
·ASP中转换unicode码为GB码…
·asp得到当前页地址
·关于ASP中的UTF8编码
·判断上一页的来源
·Asp中有关字符编码转换的几…
·用正则式除去HTML标记
·ASP 三十二条精华代码
·动检测上传文件是否含有非…
·常用过滤函数
推荐信息
·ASP 三十二条精华代码
·ASP中转换unicode码为GB码…
·如何拒绝同一张表单被多次…
·常用过滤函数
·常用asp代码
·Asp中有关字符编码转换的几…
·获得上一个月几月
·计算文件下载时间
·三条语句搞定路径
·判断上一页的来源


Google
 
用HTML META标签和ASP来作定时迟时信息
〖编辑:Cloudy | 浏览:人次〗

Using ASP and HTML Meta TAGS To Make A Dynamic Delay Message

This is a little trick to display a timed message to the user after doing some sort of task. By mixing
some creative ASP with a simple HTML META Refresh you can display a message to a user for a specified
period of time and then redirect them back to wherever you want.

META tags with an HTTP-EQUIV attribute are equivalent to HTTP headers. Usually, they control the action of
browsers, and may be used to refine the information provided by the actual headers.

Here is how it works.

After completing some sort of ASP code. ( Possibly a database update ).

You can redirect the user like so to the delay page.

First, turn on buffering because you'll probably need it depending on where in your page you redirect.

Put this at the top of your page before the <HTML> Tag.
<% Response.Buffer = True %>

Then when you are ready to send the user to the delay page do something like this.

<% MYMESSAGE = Server.URLEncode("Adding New Product....Please Wait") %>
<% Response.Redirect ("delay.asp?DELAY_TIME=3&DELAY_MESSAGE=" & MYMESSAGE & "&REDIRECT_URL=default.asp") %>
As you see can see there are 3 variables we send to the delay page.

DELAY_TIME
REDIRECT_URL
DELAY_MESSAGE

Then the delay.asp page would consist of the following code.

<%@ LANGUAGE="VBSCRIPT" %>
<%
DELAY_TIME = Request("DELAY_TIME")
REDIRECT_URL = Request("REDIRECT_URL")
DELAY_MESSAGE = Request("DELAY_MESSAGE")
%>
<html>

<head>
<meta http-equiv="Refresh" content="<% =DELAY_TIME %>; URL=<% =REDIRECT_URL %>">
<title>Delay</title>
</head>

<body color="#FFFFFF">

<font face="Arial"><p align = "center"><strong><% =DELAY_MESSAGE %></strong></p></font>

</body>
</html>


录入时间:2006-06-04 18:58:34 [打印本页] [关闭窗口] [返回顶部]
特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。

Copyright © 2006-2014 0733168.Com Inc All Rights Reserved
关于我们 | 广告合作 | 联系我们 | 法律声明 | 友情链接 | 意见反馈
本站所收录信息、社区话题、及本站所做之广告均属其个人行为,与本站立场无关
湘ICP备06008436号