Asp测试网速代码(带进度条)

作者:海娃 来源:51windows.net 时间:2007-11-12 13:09:00 

代码如下,另存为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>asp网速测试</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
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>
</body>
</html>


标签:网速,测试,asp
0
投稿

猜你喜欢

  • 在ASP中用FormatDateTime格式化日期

    2010-08-08 19:16:00
  • 仅允许指定的机器连接SQL Server服务器

    2010-07-22 19:54:00
  • javascript图片预加载

    2009-08-30 12:47:00
  • MYSQL数据库教程:唯一编号

    2009-02-27 15:27:00
  • 编译asp应用程序成为exe文件

    2008-10-23 14:01:00
  • 五种提高 SQL 性能的方法

    2008-05-16 10:40:00
  • JS获取页面窗口实际大小函数

    2008-01-28 13:18:00
  • JavaScript库jQuery入门简介

    2007-10-17 11:43:00
  • XML 问题: 超越DOM(轻松使用 DOM 的技巧和诀窍)

    2008-09-05 17:12:00
  • 快速解决 MySQL中与浮点比较有关的问题

    2008-11-27 16:28:00
  • 常用CSS命名参考

    2008-03-10 11:38:00
  • 静态页面利用JS读取cookies记住用户信息

    2011-04-14 11:17:00
  • 从一道js笔试题到==运算符的简析

    2010-05-10 20:28:00
  • ASP访问数量统计代码

    2011-04-08 10:59:00
  • 编程活动中几个不良现象

    2008-09-01 12:23:00
  • 分享我们的select控件设计过程

    2009-06-16 18:04:00
  • 利用GAE&Google Gears做了一个简单的AJAX代理

    2009-04-29 12:42:00
  • sql server中通过查询分析器实现数据库的备份与恢复方法分享

    2012-05-22 18:41:58
  • FrontPage服务器扩展

    2008-03-05 13:05:00
  • 利用ASP实现事务处理的方法

    2010-05-11 16:53:00
  • asp之家 网络编程 m.aspxhome.com