|
 |
您现在的位置: 红色黑客联盟 >> 程序开发 >> Web开发 >> asp编程 >> 正文 |
| ASP实现带进度条的测试网速的代码程序 |
|
|
|
| 文章录入:7747.Net 责任编辑:7747.Net 更新时间:2008-1-14 16:17:23 |
|
|
【字体:小 大】 |
ASP实现带进度条的测试网速。
把下列代码存为.ASP的文件,放在你的服务器上就可以直接运行了。
以下为引用的内容:
<% Response.Expires = 0 Response.Expiresabsolute = Now() - 1 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "no-cache" %><html> <head> <title>网速测试-51windows.Net</title> <meta http-equiv="content-type" content="text/html; charset=gb2312"> <body style="cursor:wait;"> <p style="font-size:18pt;"><B>网速测试</B></p> <p id="t" style="font-size:16pt;">正在测试,请稍候...</p> <span style="width:300;height:16px;background-color:gray;"><span id="p" style="width:0;height:16px;background-color:red;"></span></span> <script language="javascript">st = new Date();function $(p){document.getElementById("t").innerHTML="正在测试,请稍候...("+p+"%)";document.getElementById("p").style.width=p*3;}</script> <% defaultfs = 200 '数据默认大小(K) minfs = 100 '数据最小值 maxfs = 500 '数据最高值 fs = Request("s") if len(fs) = 0 or isnumeric(fs) = false then fs = defaultfs if int(fs) > maxfs then fs = maxfs if int(fs) < minfs then fs = minfs//webjx.com for a=1 to fs%><!--$%^)!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()--><script language=javascript>$(<%=int(a*100/fs)%>)</script><%next%> <script language=javascript> et=new Date();ds=<%=fs%>;s=Math.round(ds*1000/(et-st)*10)/10;document.body.style.cursor='default'; nextsize=<%=fs%>;if(s>100){nextsize=<%=maxfs%>;}else if(s<20){nextsize=<%=minfs%>;} document.getElementById("t").innerHTML="测试完毕。您的速度:<font color='red'>"+s+"</font>(K/秒) [<a href='?s="+nextsize+"&t="+Math.random()+"'>重测</a>]";</script>//webjx.com </body> </html> |
|
| |
| 您对本文章有什么意见或着疑问吗?请到论坛讨论您的关注和建议是我们前行的参考和动力 |
|
|
| |
上一个文章: ASP+JavaScript的完整的日历使用
下一个文章: ASP程序实现网页伪静态页源代码 |
| 【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |