<title>进度条</title>
<style>
body {background: #ccccff} body { overflow:hidden }
p.txtstyle {color: navy; font-family: verdana; font-size: 10pt; font-weight: bold; margin-left: 10px }
input.pbstyle {color: navy; font-family: wingdings; font-size: 10pt; background: silver; height: 20px; width: 340px }
</style>
<div id="objprogress" class="outer"></div>
<center>
<b>
<span id=txtmilestone class='txtstyle' style='margin-left: 10px'></span>
<font color=green>
<span id=txtremarks class='txtstyle' style='margin-left: 10px'></span>
</font>
<b>
<br>
<br>
<input type='text' id='pbtext' class='pbstyle' value='' >
<br>
<br>
<input type='button' value='cancel' onclick='setreturnflag("quit")' >
</center>
<form name='secret' > <input type='hidden' name='pubflag' value='run' ></form>
<script language='vbscript' >
sub setreturnflag(sflag)
secret.pubflag.value = sflag
txtmilestone.style.color = "red"
txtremarks.style.color = "red"
end sub
function pctcomplete(npct)
pbtext.value = string(npct," ") & string(4,"n")
end function
sub updateprogress()
dim intstep
dim intdirection
if (isnull(objprogress.getattribute("step")) = true) then
intstep = 0
else
intstep = objprogress.step
end if
if (isnull(objprogress.getattribute("direction"))=true) then
intdirection = 0
else
intdirection = objprogress.direction
end if
if intdirection=0 then
intstep = intstep + 1
else
intstep = intstep - 1
end if
call pctcomplete(intstep)
if intstep>=23 then
intdirection=1
end if
if intstep<=0 then
intdirection=0
end if
objprogress.setattribute "step", intstep
objprogress.setattribute "direction", intdirection
window.settimeout getref("updateprogress"), 80
end sub
sub dialoghardtimeout()
setreturnflag("quit")
end sub
sub window_onload()
theleft = (screen.availwidth - document.body.clientwidth) / 2
thetop = (screen.availheight - document.body.clientheight) / 2
window.moveto theleft,thetop
window.settimeout getref("updateprogress"), 80
window.settimeout getref("dialoghardtimeout"), 3600000
end sub
</script>