在“中国软件测试联盟”偶然看到的觉得挺好就抽出来访在这儿也许用得着!!
有研究动态的可以参考,做出来别忘了给兄弟一份!!期待……
1<HTML>
2<HEAD>
3<SCRIPT type=text/javascript>
4var ie5 = (document.all && document.getElementsByTagName);
5var step = 0;
6
7function setSB(v, el, inforEl, message) {
8 if (ie5 || document.readyState == "complete") {
9 filterEl = el.children[0];
10 valueEl = el.children[1];
11 if (filterEl.style.pixelWidth > 0) {
12 var filterBackup = filterEl.style.filter;
13 filterEl.style.filter = "";
14 filterEl.style.filter = filterBackup;
15 }
16
17 filterEl.style.width = v + "%";
18 valueEl.innerText = v + "%";
19 inforEl.innerText = message;
20 }
21}
22
23
24function setSBByStep(v, el, inforEl, message) {
25 if (ie5 || document.readyState == "complete") {
26 step = step + v;
27 filterEl = el.children[0];
28 valueEl = el.children[1];
29
30 if (filterEl.style.pixelWidth > 0) {
31 var filterBackup = filterEl.style.filter;
32 filterEl.style.filter = "";
33 filterEl.style.filter = filterBackup;
34 }
35
36 filterEl.style.width = step + "%";
37 valueEl.innerText = step + "%"
38 inforEl.innerText = message;
39 }
40}
41
42function fakeProgress(v, el) {
43 if (v >= 101)
44 location.href="#";//跳转路径
45 else {
46 setSB(v, el, infor, " 页面正在加载中……");
47 window.setTimeout("fakeProgress(" + (v + 1) + ", document.all['" + el.id + "'])", 100);
48 }
49}
50
51</SCRIPT>
52
53</HEAD>
54<BODY onload=fakeProgress(0,sb)>
55<!--
56sb 底色
57sbChild1 黑色
58infor 信息
59-->
60<DIV align=center>
61 <CENTER>
62 <DIV align=center>
63 <DIV id=sb style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BACKGROUND: #aaccff; WIDTH: 400px; BORDER-BOTTOM: #cccccc 1px solid; HEIGHT: 14px; TEXT-ALIGN: left">
64 <DIV id=sbChild1 style="FILTER: Alpha(Opacity=0, FinishOpacity=80, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0); OVERFLOW: hidden; WIDTH: 100%; POSITION: absolute; HEIGHT: 12px">
65 <DIV style="BACKGROUND: #000000; WIDTH: 100%" height:12px; overflow: hidden>
66 </DIV>
67 </DIV>
68 <DIV style="FONT-SIZE: 10px; WIDTH: 400px; COLOR: white; FONT-FAMILY: arial; POSITION: absolute; HEIGHT: 14px; TEXT-ALIGN: center">
69 </DIV>
70 </DIV>
71 <P></P><!-- 间距 -->
72 <DIV id=infor style="FONT-SIZE: 11px; WIDTH: 100%; COLOR: #999999; FONT-FAMILY: arial; POSITION: relative; HEIGHT: 14px; TEXT-ALIGN: center">
73 </DIV>
74 </DIV>
75 </CENTER>
76</DIV>
77</BODY>
78</HTML>
posted on 2007-10-19 09:19
lk 阅读(4292)
评论(1) 编辑 收藏 所属分类:
ajax&js