<script>
function init(){
var timer1=new Date().getTime();
var img=new Image();
img.src="http://www.netfront.net/speedtest/images/photo" + parseInt(Math.round(Math.random()*5)+1) + ".bmp?" + Math.random();
img.οnlοad=function(){
size=img.fileSize;
alert("下载速度: " + Math.round(size/(new Date().getTime()-timer1)) + " KB/S");
}
document.body.appendChild(img);
}
</script>
<body οnlοad="javascript:init()">
</body>