<SCRIPT>
var i;
function longtime()
{
i=0;
b1.style.cursor="wait";
b1.disabled=true;
timedIterations();
}
function timedIterations()
{
if (i<=140)
{
d1.innerText="正在裝載........."+Math.round(i/1.4)+"%";
d2.style.width=i;
// following statements represents a calculation that takes some time
var j=0;
while (j<=10000)
j++;
setTimeout("timedIterations();", 1);
i++;
}
else
{
b1.style.cursor="";
b1.disabled=false;
}
}
</SCRIPT>
<BODY id=b1 onload="longtime();" leftmargin=250 topmargin=200>
<DIV id="d1">正在裝載.....</DIV>
<DIV id="d2" style="background-color:#1b3679"></DIV>
</BODY>
更多信息請(qǐng)查看IT技術(shù)專欄