页面载入进度条

来源:互联网 发布:js表格怎么合并 编辑:程序博客网 时间:2024/04/28 12:13

<HTML>
<HEAD>
<TITLE>页面载入进度条</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
</HEAD>

<BODY>

<form name=loading>
<p>页面载入中,请等待</FONT>
<br><input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:black; background-color:#EAEAEA; padding:0px; border-style:none;">
<br><input type=text name=percent size=46 style="font-family:Arial; color:black; text-align:center; border-width:medium; border-style:none;">
</p>
</form>

<script>var bar = 0
var line = "||";
var amount ="||";
function count()
{
bar= bar+2
amount =amount + line
document.loading.chart.value=amount
document.loading.percent.value=bar+"%"
if (bar<99) {setTimeout("count()",100);}
else {window.location = "http://www.google.com/";}
}
count();
</script>

</BODY>
</HTML>