发信人: xianfu163com(凤凰E站)
整理人: eagle(2002-01-29 09:05:05), 站内信件
|
不可思议--检测链接速度 你想知道你链接某一网站要多长时间吗?这下你就一目了然了 ...
---------------------------------------------------------------------请将下面的原代码插入到<body>下面 ,
选定以下所有代码
<script>
tim=1
setInterval("tim++",100)
b=1
var autourl=new Array()
autourl[1]="www.163.com"
autourl[2]="phoenixgo.126.com"
autourl[3]="www.sina.com.cn"
autourl[4]="www.gxnu.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>
---- ^_^ 请诸位大虾指教:我的网上之家:凤凰E站<br>MY EMAIL |
|