<HTML> <HEAD> <TITLE>Speed Checker</TITLE> <SCRIPT TYPE="text/javascript"> <!-- var IMG = 2000;//Dammy.bmpのサイズ(kb) var Times = 0; var Sec = 0; function Timer(){ var DTS=new Date(); var URL = ""; URL = "Dammy.bmp"; URL += "?"; URL += DTS.getHours(); URL += DTS.getMinutes(); URL += DTS.getSeconds(); document.Dammy.src=URL; Times = setInterval('Count()',100); } function Count(){ Sec += 0.1; if(document.Dammy.complete == true){ clearInterval(Times); alert("The loading speed is "+Math.round(IMG/Sec)+"kbps at present."); } } //--> </SCRIPT> </HEAD> <BODY> <IMG NAME="Dammy" WIDTH="1" HEIGHT="1"> <IMPUT TYPE="button" VALUE=" START " onClick="Timer()"> </BODY> </HTML> |