首页 >> 网页特效 >> 测试搜索 >> 正文
来源: 不详 | 时间: 2006-1-15 18:24:27 | 人气:
测试网页的链接速度
<script language=""> tim=1 setInterval("tim++",100) b=1 var autourl=new Array() autourl[2]="http://www.jojoo.net/default.asp" autourl[1]="http://www.jojoo.net/down/default.asp" 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=测试中…… class=buttonface>==><input type=text name=url"+i+" size=60 class=buttonface><br>") document.write("<input type=button value=重新测试速度 onclick=top.location=self.location class=buttonface></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="+autourl[ i ]+"/"+Math.random()+" width=1 height=1 onerror=auto('"+autourl[ i ]+"')>")} run()</script>