您的位置:网大 >> 网络 >> 网页特效 >> 正文

检测点链接速度

作者:不详时间:2006-1-13 15:26:47

 

脚本说明:

 

把如下代码加入<body>区域中:

 

<script>

 

tim=1

 

setInterval("tim++",100)

 

b=1

 

 

 

var autourl=new Array()

 

autourl[1]="webset.3322.net"

 

autourl[2]="waha.3322.net"

 

autourl[3]="www.sina.com.cn"

 

autourl[4]="www.nuaa.edu.cn"

 

autourl[5]="www.cctv.com"

 

 

 

function butt(){

 

document.write("<form name=autof>")

 

for(var i=1;i<autourl.length;i++)document.write("<input type=text name=txt"+i+" size=10 value=测试中……> =》<input type=text name=url"+i+" size=40> =》<input type=button value=GO onclick=window.open(this.form.url"+i+".value)><br>")

 

document.write("<input type=submit value=刷新></form>")

 

}

 

butt()

 

function auto(url){

 

document.forms[0]["url"+b].value=url

 

if(tim>200)

 

{document.forms[0]["txt"+b].value="链接超时"}

 

else

 

{document.forms[0]["txt"+b].value="时间"+tim/10+"秒"}

 

b++

 

}

 

function run(){for(var i=1;i<autourl.length;i++)document.write("<img src=http://"+autourl[i]+"/"+Math.random()+" width=1 height=1 onerror=auto('http://"+autourl[i]+"')>")}

 

run()</script>

 

 

 

 


评论数: 来源:不详

关键字:检测
相关文章
  • 检测IE所装插件 [2006-1-13]

  • 网大首页 - 网站地图 - 广告服务 - 关于网大 - 招聘信息 - 联系我们
    Copyright (C) 1999-2005 NETBIG.COM (CHINA) LIMITED All Rights Reserved
    粤B-20050190