代码如下:
<Público: componente>
<Public: MethodName = "init" Internalname = "FncreateProgressBar"/>
<Public: MethodName = "SHOWPROGRESS" InternalName = "SHOPPROGRESS"/>
<Public: PropertyName = "Container"/>
<Public: PropertyName = "Speed"/>
<ScriptLanguage = JavaScript>
varstartTime = null;
functionFncreateProgressBar () {
agora = newDate ();
startTime = agora.getTime ();
agora = nulo
ocontainer = element.Container
ocontainer.innerhtml = "";
odiv = window.document.createElement ("div")
odiv.className = "Progresso"
Ocontainer.AppendChild (ODIV)
odiv.style.display = "";
element.Bar = ODIV;
}
functionPause (númeroMillis) {
vardialogScript =
'window.setTimeout ('+
'function () {window.close ();},'+numberMillis+');';
Varresult =
window.showmodaldialog (
'JavaScript: document.writeln ('+
'"<cript>'+dialogscript+'<'+'/script>")');
}
FunctionShowProgress (StatesDesc) {
agora = newDate ();
currtime = agora.getTime ();
agora = nulo
if (estadosdesc! = null) window.status = statesdesc+"当前耗时:"+(currtime-starttime)+"毫秒!";
element.bar.style.width = (currtime-starttime) /Element.speed;