<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<meta http-equiv= "Content-type" content= "text/html; CHARSET=GBK ">
<title>flash DownLoad Download Control Sample </title>
<meta name= "mssmarttagspreventparsing" content= "TRUE" >
<meta http-equiv= "msthemecompatible" content= "Yes" >
<style type= "Text/css" >
Body {
Scrollbar-base-color: #F5FBFF;
Scrollbar-arrow-color: #86B9D6;
font:12px Tahoma, Verdana;
Background-color: #FFFFFF;
Color: #333333;
}
Table {
font:12px Tahoma, Verdana;
Color: #333333;
Empty-cells:show;
Border-collapse:separate!important;
Border-collapse:collapse;
}
Input, select, textarea {
font:12px Tahoma, Verdana;
Color: #333333;
Font-weight:normal;
Background-color: #F5FBFF;
border:1px solid #7AC4EA;
}
Input {
height:21px;
}
A
Text-decoration:none;
Color: #154BA0;
}
a:hover {
Text-decoration:underline;
}
. CheckBox,. Radio {
border:0px;
Background:none;
Vertical-align:middle;
height:16px;
}
</style>
<BODY>
<script language= "JavaScript" >
/********************************************************
* ProgressBar class
* @author NULL
* @param width-width of progress bar
* @param height-height of progress bar
* @param fgcolor-fgcolor of progress bar
* @param bgcolor-bgcolor of progress bar
* @param bordercolor-bordercolor of progress bar
The rule is the same border-color of CSS
/********************************************************/
function ProgressBar (width,height,fgcolor,bgcolor,bordercolor) {
if (bordercolor==undefined) {
bgcolor = "Threedlightshadow";
Fgcolor = "Highlight";
bordercolor = "Buttonshadow window window Buttonshadow";
}
else if (bordercolor==undefined&&fgcolor==undefined&&bgcolor==undefined) {
bgcolor = "Threedlightshadow";
Fgcolor = "Highlight";
bordercolor = "Buttonshadow window window Buttonshadow";
}
Percent = 0.0; Initialize to zero
FontSize = Math.ceil (HEIGHT/2) +1;
FONT_BT = "<table width=100% height=100% cellpadding=0 cellspacing=0 style= ' font:bold" +fontSize+ "px Arial;color:" + Bgcolor+ "; text-align:center;vertical-align:center; ' ><tr><td> "+parseint (percent*100) +"%</td></tr></table> ";
font_ft = "<table width=100% height=100% cellpadding=0 cellspacing=0 style= ' font:bold" +fontSize+ "px Arial;color:" + Fgcolor+ "; text-align:center;vertical-align:center; ' ><tr><td> "+parseint (percent*100) +"%</td></tr></table> ";
Squares = "";
for (Var i=0;;; i++) {
var left = width-2-i* (height/2+1);
alert (left);
if (left>=height/2+1) {
Squares + = "<span style= ' background-color:" +fgcolor+ "; width:" +height/2+ "Px;height:" + (height-2) + "; margin-right : 1px; ' ></span> ";
}
else if (left>=1) {
Squares + = "<span style= ' background-color:" +fgcolor+ "; width:" +left+ "Px;height:" + (height-2) + "; margin:0px; ' ></span> ";
}
Else
Break
}
Position:absolute;
str = "<span id=progress_bg style= ' width:" +width+ "Px;height:" +height+ "Px;background-color:" +bgcolor+ "; border : 1px solid;border-color: "+bordercolor+" ' > "; "+fgcolor+" #transparent
str = "<span id=progress_fg style= ' position:absolute;width:100%;height:100%;clip:rect (0," +parseInt (percent*100 ) + "%,100%,0"); Background-color: "+fgcolor+"; font-size:0px;line-height:0px; ' > ";
str = squares;
STR + + "</span>";
str = "<span id=progress_bt style= ' position:absolute;z-index:8;width:100%;height:100%;background-color:# Transparent;clip:rect (0, "+parseint (percent*100) +"%,100%,0); text-align:center; ' > ";
str = FONT_BT;
STR + + "</span>";
str = "<span id=progress_ft style= ' position:absolute;z-index:9;width:100%;height:100%;background-color:# Transparent;clip:rect (0,100%,100%, "+parseint (percent*100) +"%); text-align:center; ' > ";
str = font_ft;
STR + + "</span>";
STR + + "</span>";
document.write (str);
Current 1/4 page
1234 Next read the full text