<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> progress bar </title>
<Style type = "text/CSS">
Body {
Text-align: center;
}
. Graph {
Width: pixel PX;
Border: 1px solid # f8b3d0;
Height: 25px;
}
# Bar {
Display: block;
Background: # ffe7f4;
Float: left;
Height: 100%;
Text-align: center;
}
# Barnum {
Position: absolute;
}
</Style>
<SCRIPT type = "text/JavaScript">
Function $ (OBJ ){
Return document. getelementbyid (OBJ );
}
Function go (){
$ ("Bar"). style. width = parseint ($ ("bar"). style. width) + 1 + "% ";
$ ("Bar"). innerhtml = $ ("bar"). style. width;
If ($ ("bar"). style. width = "100% "){
Window. clearinterval (bar );
}
}
VaR bar = Window. setinterval ("Go ()", 50 );
Window. onload = function () {bar ;}
</SCRIPT>
</Head>
<Body>
<Div class = "Graph">
<Strong id = "bar" style = "width: 1%;"> </strong>
</Div>
</Body>
</Html>