<script LANGUAGE="JAVASCRIPT">
var timerID=null;
var count=0;
var running=false;
function RandomNumber(max)
{var today = new Date();
var num= Math.round((Math.abs(Math.sin(today.getTime()))*1000))%max+1;
return num;
}
function stopaction()
{if (running)
clearTimeout(timerID);
running=false;
}
function startaction()
{ stopaction();
action();
}
function action()
{if (count!=100)
{ document.outputform.output.value="正在格式化硬盤,目前進(jìn)度:"+count+"%";
count++;
timerID=setTimeout("action()",200+RandomNumber(500));
running=true;
}
else
{ document.outputform.output.value="格式化完畢 ... ...";
stopaction();
}
}
</script>
虛擬格式化