<body>
<script language=javascript>
tim=1;
setInterval("tim++",100);
autourl="javacool.3322.net";function butt(){
document.write("<form name=autof>");
document.write("<input type=hidden name=txt size=10 value=测试中……> =》<input type=hidden name=url size=40> =》<input type=hidden value=GO onclick=window.open(this.form.url.value)><br/>");
document.write("<input type=submit value=刷新></form>");
}
butt();
function auto(url){
document.forms[0]["url"].value=url;
if(tim>200)
{document.forms[0]["txt"].value="链接超时";alert("链接超时错误");}
else
{document.forms[0]["txt"].value="时间"+tim/10+"秒";alert("正确");}
}
function run(){document.write("<img src=http://"+autourl+"/"+Math.random()+" width=1 height=1 onerror=auto('"+autourl+"')>");}
run();</script></body>
这个能测网址连接的时间。不知道够不够用。