分享百分比进度条
演示地址: http://56390.com/pro.htm
源代码:
<html>
<head>
<title> 数据查询中 </title>
<meta http-equiv= "Content-Language " content= "zh-cn ">
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<meta http-equiv= "Page-Enter "
content= "progid:DXImageTransform.Microsoft.Pixelate(duration=1) ">
<script language= "javascript " type= "text/javascript ">
<!--
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos== "random "){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos== "center "){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!= "center " && pos!= "random ") || pos==null){LeftPosition=0;TopPosition=20}
settings= 'width= '+w+ ',height= '+h+ ',top= '+TopPosition+ ',left= '+LeftPosition+ ',scrollbars= '+scroll+ ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no ';
win=window.open(mypage,myname,settings);}
// -->
</script>
<link href= "public/css.css " rel= "stylesheet " type= "text/css ">
<style type= "text/css ">
<!--
body {
margin-left: 0px;
margin-top: 0px;
}
.wait {
font-size: 12px;
text-decoration: none;
}
-->
</style>
</head>
<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/5 + "% ";
valueEl.innerText = v/5 + "% ";
inforEl.innerText = message;
}
}
function setSBByStep(v, el, inforEl, message) {
if (ie5 || document.readyState == "complete ") {
step = step/5 + 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/5 + "% ";
valueEl.innerText = step/5 + "% "
inforEl.innerText = message;