加载进度条

<html>
<form name=loading>
<td align=center>
<div>本次用时大约3分钟</div>
<p><font color=gray>正在创建课程,请稍候.......</font></p>
<input type=text name=chart size=46 style="font-family:Arial;
font-weight:bolder; color:gray;
background-color:white; padding:0px; border-style:none;">
<br>
<input type=text name=percent size=46 style="font-family:Arial;
color:gray; text-align:center;
border-width:medium; border-style:none;">
</td>
</form>
<script>
    var bar=0;
    var line="||";
    var amount="||";
    count();
    function count(){
        bar=bar+2;
        amount=amount+line;
        document.loading.chart.value=amount;
        document.loading.percent.value=bar+"%";
        if (bar<99) 
        {
            setTimeout("count()", 3600);
        }
        else{
            window.location="http://www.baidu.com/";
        }
    }
</script>
</html>

猜你喜欢

转载自blog.csdn.net/qq_39208536/article/details/80909521