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;
}
}
更多信息请查看IT技术专栏