<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>