前臺更新進度條js-4

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="http://free.alixixi.com">
<style>
#sb{
width:563px;
height:22px;
background:url(images/jindutiao.gif) no-repeat;
}
#sbone{
height:22px;
background:url(images/jindu_bg.gif) no-repeat right;
font-size:14px;
color:#FFF;
font-weight:bold;
line-height:22px;
margin-left:10px;
padding-right:25px;
text-align:right;
}
</style>
<script language="javascript">
function setSB(v, el) {
    var ie5 = (document.all && document.getElementsByTagName);
    if (ie5 || document.readyState == "complete")     {
      filterEl = el.children[0];
      filterEl.style.width = v + "%";
  document.getElementById("sbone").innerHTML=v + "%";
    }
}
function fakeProgress(v, el) {
var process=70;
    if (v <= process)
      setSB(v, el);
      window.setTimeout("fakeProgress(" + (++v) + ", document.all['" + el.id + "'])", 20);
  
}
</script>
</head>javascript

<body onLoad="fakeProgress(10, sb)" bgcolor=#eeeeee>
<center>
<div id="sb">
<div id="sbone" style="width: 0%; float:left;"></div>
</div>
</center>html

</body>
</html>java

相關文章
相關標籤/搜索