欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

ASP实现带进度条的测试网速的代码程序

程序员文章站 2022-08-09 17:26:39
asp实现带进度条的测试网速。 把下列代码存为.asp的文件,放在你的服务器上就可以直接运行了。 以下为引用的内容: &...

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>