当前位置: 首页 > 图文教程 > 网络编程 > ASP > WEB页面简单进度记时器

ASP
对连串英文自动换行的解决方法 IE5.5
怎样写你自己的EMAIL组件(原理)
ASP中有关timeout超时的体会
用ASP实现从SQL Server导出数据到Access
ASP向NT域中加一个用户
ASP乱码的解决方法
关于 aspsmartupload 注册问题
利用XML不离开页面刷新数据
IIS 处理 SEARCH 请求漏洞
不用组件实现上载功能(1)
不用组件实现上载功能(2)
在网页中实现OICQ里的头像选择的下拉框
仅用xsl和asp实现分页功能
如何使用context()方法将数据置入表格(XML)
利用ASP从远程服务器上接收XML数据
将数据库里面的内容生成EXCEL
怎样在ASP里面创建统计图表
加密你的Access数据库
利用global.asp定时执行ASP
加密QueryString数据

ASP 中的 WEB页面简单进度记时器


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 67 ::
收藏到网摘: n/a

  <html>
<head>
<title> TimeBar Version 1.0 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Refresh" content="20;url=">
<style>
td {font-size: 10.5pt; color: 147e19; font-family: Courier New;}
</style>
</head>
<body bgcolor="#FFFFFF">
<br><br><br><br>
<center>
<table width=500 border=0>
<tr><td>
<br>
<p align=center>TimeBar V1.0 by [email protected]<br>请查看源代码<br>
请设置进度条的增长速度和每次增长的长度</p>
<table align=left><tr><td width=1 bgcolor=#99ccff height=5 id=Ratio></td></tr></table>
<!--将上面一行的align=left换成right或center,看看效果如何-->
</td></tr>
<tr><td bgcolor=eeeeee>&nbsp;20秒后刷新本页</td></tr>
</table></center>
</body>
</html>
<script language="javascript">
//TimeBar V1.0 by [email protected]
//2000.11

ShowRatio();
function ShowRatio()
{
var intTimer=40; //进度条增长速度
var intAddwidth=1; //每次增长的长度,最小为1
var intMaxWidth=500; //最大宽度
//以上两个数值需要根据你的进度条总宽和延迟时间决定,例如: 本页的进度条长度为500,需要在20秒后刷新或离开本页,则
//intAddwidth=(20*1000)/500=40.当然,可以让intAddwidth=80,intTimer=2,请试一试。
var rw;
if (Ratio.width=="") Ratio.width=1;
rw=parseInt(Ratio.width);
Ratio.width=rw+intAddwidth;
if (rw+10<intMaxWidth) setTimeout("ShowRatio()",intTimer);
}
</script>

【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】