代码如下:
<public: مكون>
<public: methodname = "init" internalName = "fnCreateProgressBar"/>
<public: methodName = "showprogress" internalName = "showprogress"/>
<public: propertyName = "Container"/>
<public: propertyName = "speed"/>
<scriptLanguage = javaScript>
varstartTime = فارغة ؛
functionFnCreateProgressBar () {
الآن = newDate () ؛
startTime = now.getTime () ؛
الآن = فارغ
Ocontainer = element.container
Ocontainer.innerhtml = "" ؛
ODIV = window.document.createElement ("div")
Odiv.ClassName = "Progress"
Ocontainer.AppendChild (ODIV)
Odiv.Style.Display = "" ؛
element.bar = odiv ؛
}
FunctionPause (numbermillis) {
vardialogscript =
'window.SettImeout ('+
'function () {window.close () ؛} ،'+numberMillis+') ؛' ؛
varresult =
window.showmodaldialog (
'JavaScript: document.writeln ('+
"<script> '+dialogscript+' <'+'/script>") ') ؛
}
FunctionShowProgress (StatesDesc) {
الآن = newDate () ؛
currtime = now.getTime () ؛
الآن = فارغ
if (statesdesc! = null) window.status = statesdesc+"当前耗时:"+(currtime-starttime)+"毫秒!" ؛
element.bar.style.width = (currtime-starttime) /element.speed ؛