利用JS测试目标网站的打开响应速度

  

闲来无事,用JS写了一个简单的测试目录网站打开速度的小东西,注意这个只是本机打开目录网站的速度,不代表其它用户的打开也是这个速度,实际上也可用于测试本地网络速度

        & lt; !DOCTYPE html公共”——//W3C XHTML 1.0//DTD过渡//EN”“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”的在   & lt; html xmlns=" http://www.w3.org/1999/xhtml "比;   & lt; head>   & lt;元http-equiv=? type”内容=" text/html;utf - 8字符集="/比;   & lt; title> test   & lt;/head>      & lt;身体背景=巴该鳌北?   & lt;风格类型=" text/css "比;   输入{字体大小:12 px;填充:0 5 px;行高:21 px;字体类型:大河马字体;边界:1 px固体# ccc;高度:21 px;} & lt;/style>   & lt;脚本语言=癹avascript”比;   蒂姆=1   setInterval (tim + +, 100)   b=1   var autourl=new Array ();   autourl [1]=" www.qq.com ";   autourl [2]=" www.jb51.net ";   autourl [3]=" www.baidu.com ";   autourl [4]=" www.sina.com ";      函数的屁股(){   document . write (“& lt;表单名称=autof风格='填充:0 px;保证金:0 px;祝辞”)   (var i=1;我& lt;autourl.length;我+ +)document . write (“& lt;输入类型=name=txt文本”+我+“大?25风格='颜色:# 999;价值=https://www.yisu.com/zixun/测试中…>=?input type=url文本name=" +我+”大?40比;=? lt;输入类型=按钮值=https://www.yisu.com/zixun/GO + b +“链接超时"}   其他的   {文档。形式[0](“三种”+ b)。值=" https://www.yisu.com/zixun/网址”+ b +”:访问速度”+蒂姆* 10 +“女士”}   b + +   }   函数运行(){(var i=1; i