代码如下 :
<public : 구성 요소>
<public : methodname = "init"internername = "fncreateprogressbar"/>
<public : methodName = "showProgress"internername = "showProgress"/>
<public : propertyname = "컨테이너"/>
<public : PropertyName = "Speed"/>
<scriptLanguage = javaScript>
varstartTime = null;
functionfncreateProgressBar () {
now = newDate ();
starttime = now.gettime ();
이제 = null
Ocontainer = Element.container
Ocontainer.innerhtml = "";
odiv = window.document.createElement ( "div")
odiv.classname = "Progress"
Ocontainer. AppendChild (ODIV)
odiv.style.display = "";
요소 .bar = odiv;
}
functionPause (numbermillis) {
vardialogscript =
'window.settimeout ('+
'function () {window.close ();},'+numbermillis+');';
varresult =
Window.showmodaldialog (
'JavaScript : document.writeln ('+
' "<cript>'+dialogscript+'<'+'/script>")');
}
FunctionShowProgress (StatesDesc) {
now = newDate ();
currtime = now.gettime ();
이제 = null
if (statesDesc! = null) wind
요소.bar.style.width = (Currtime-StartTime)/Element.speed;