Home>

Effect picture:

Specific code:

<html>
<head>
<title>open code</title>
<script type=text/javascript>
<!-
var ie5=(document.all&&document.getelementsbytagname);
var step=0;
function setsb (v, el, inforel, message) {
if (ie5 || document.readystate == "complete") {
filterel=el.children [0];
valueel=el.children [1];
if (filterel.style.pixelwidth>0) {
var filterbackup=filterel.style.filter;
filterel.style.filter="";
filterel.style.filter=filterbackup;
}
filterel.style.width=v + "%";
valueel.innertext=v + "%";
inforel.innertext=message;
}
}
function setsbbystep (v, el, inforel, message) {
if (ie5 || document.readystate == "complete") {
step=step + v;
filterel=el.children [0];
valueel=el.children [1];
if (filterel.style.pixelwidth>0) {
var filterbackup=filterel.style.filter;
filterel.style.filter="";
filterel.style.filter=filterbackup;
}
filterel.style.width=step + "%";
valueel.innertext=step + "%"
inforel.innertext=message;
}
}
function fakeprogress (v, el) {
if (v>= 101)
else {
setsb (v, el, infor, "The page is jumping,Please wait...");
window.settimeout ("fakeprogress (" + (v + 1) + ", document.all [" "+ el.id +" "])", 10);
}
}
//->
</script>
<script language=javascript>
</script>
</head>
<body bgcolor=#f9f9f9 topmargin=100 onload=fakeprogress (0, sb)>
<p></p>
<p></p>
<p></p>
<!-Status bar starts->
<div align=center>
<div id=sb
style="border-right:#ffffff 1px solid;border-top:#ffffff 1px solid;background:#99ccff;border-left:medium none;width:400px;border-bottom:#cccccc 1px solid;height:14px;text-align:left ">
<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 ">
<div;height:12px;overflow:
hidden></div>
</div>
<div
style="font-size:10px;width:400px;color:white;font-family:arial;position:absolute;height:14px;text-align:center"></div>
</div>
<!-Status bar ends->
<p></p>
<div id=infor
style="font-size:11px;width:100%;color:#999999;font-family:arial;position:relative;height:14px;text-align:center"></div>
</div>
</body>
</html>

Code sharing:

<html>
<head>
<script language="javascript">
 function setsb (v, el) {
  var ie5=(document.all&&document.getelementsbytagname);
  if (ie5 || document.readystate == "complete") {
   filterel=el.children [0];
   valueel=el.children [1];
   filterel.style.width=v + "%";
   valueel.innertext=v + "%";
  }
 }
 function fakeprogress (v, el) {
  if (v>100)
  else {
   setsb (v, el);
   window.settimeout ("fakeprogress (" + (++ v) + ", document.all [" "+ el.id +" "])", 20);
  }
 }
</script>
</head>
<body onload="fakeprogress (0, sb)" topmargin=180 bgcolor=#cccccc>
<center>
<span id=sb>
<div></div>
<div></div>
</span>
 </center>
 </body>
</html>

Copy and paste the code to run.You can experiment.

  • Previous Summary of http request method libraries in Python
  • Next C # implements a method of taking a screenshot based on a url in a web page and outputting it to the web page