« 科学家破解七种常见病基因 有助研制新药物下拉"cool"菜单 »

在页面中显示进度条的效果

发布:彭涛 | 分类:.Net开发 | 评论:0 | 引用:0 | 浏览:
要完成此效果把如下代码加入到<body>区域中
<form name=loading>
  <p align=center> <font color="#0066ff" size="2" face="Arial">载入中,请稍等...</font><br>
    <input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;">
    <br>
    <input type=text name=percent size=47 style="color:#0066ff; text-align:center; border-width:medium; border-style:none;">
    <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
{window.location = "#";}
}</script>
  </p>
</form>

tagTags:jindu  

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。