当前页面: 开发资料首页 → Javascript 专题 → 装载页面进度条
摘要: 装载页面进度条
.unnamed1 { background-color: #000000}
</head>
<body>
<table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%">
<tr>
<form name=loading>
<td align=center>
<input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#00FF00; background-color:black; padding:0px; border-style:none;">
<input type=text name=percent size=46 style="font-family:Arial; color:#00FF00; text-align:center; border-width:medium; border-style:none;" class="unnamed1">
<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()",100);
}
else
{
alert("载入完毕")
window.location = "http://www.csdn.net";
}
}
</script>
</tr>
</table>
</body>
以上代码拷贝即可使用
</td> </tr> <tr> <td vAlign=top align=left height="100%">