运行代码 缩小
汉王
HTML代码
复制 格式化 注释 注释 清空
放大
x
 
1
<title>网页loading</title>
2
<script language="javascript">
3
  function setSB(v, el) {
4
    var ie5 = (document.all  &&  document.getElementsByTagName);
5
    if (ie5 || document.readyState == "complete")     {
6
      filterEl = el.children[0];
7
      valueEl = el.children[1];
8
      filterEl.style.width = v + "%";
9
      valueEl.innerText = v + "%";
10
    }
11
  }
12
  function fakeProgress(v, el) {
13
    if (v > 100)
14
      location.href = "/";
15
    else     {
16
      setSB(v, el);
17
      window.setTimeout("fakeProgress(" + (++v) + ", document.all['" + el.id + "'])", 20);
18
    }
19
  } 
20
</script> 
21
</head>  
22
23
<body onload="fakeProgress(0, sb)" topmargin=180 bgcolor=#CCCCCC>
24
<center> 
25
<p align=center style="font-szie:9pt; line-height: 100%">正在加载请稍侯……</p>
26
<span id=sb style="width: 500px">
27
<div style="filter: Alpha(Opacity=0, FinishOpacity=60, style=1, StartX=0, StartY=0, FinishX=100, FinishY=0); width: 0%; height: 12px; position: absolute; background: #9999ff"></div>
28
<div style="font-size: 12px; width: 100%; color: #ff3333; font-family: arial; text-align: center"></DIV>
29
</span>
30
 </center>
31
 </body> 
32
</html>
CSS代码
复制 格式化 注释 注释 颜色 清空
放大
CSS代码...
xxxxxxxxxx
1
 
1
JS代码
复制 格式化 注释 注释 清空
放大
JS代码...
xxxxxxxxxx
1
 
1
名称
经典的网页loading进度条代码
分类
网站常用
描述
一款非常经典,也是见得比较多的网页Loading进度条特效代码,直接复制到你的网页中就生效了。
收藏