使用Flash DownLoad编写采集器(之突破防盗连下载音乐文件)第14页

2018-09-06 12:19

阅读:434

  <!DOCTYPEHTMLPUBLIC-//W3C//DTDHTML4.0Transitional//EN>
<html>
<head>
<metahttp-equiv=Content-Typecontent=text/html;charset=gbk>
<title>FlashDownLoad下载控件示例</title>
<metaname=MSSmartTagsPreventParsingcontent=TRUE>
<metahttp-equiv=MSThemeCompatiblecontent=Yes>
<styletype=text/css>
body{
scrollbar-base-color:#F5FBFF;
scrollbar-arrow-color:#86B9D6;
font:12pxTahoma,Verdana;
background-color:#FFFFFF;
color:#333333;
}
table{
font:12pxTahoma,Verdana;
color:#333333;
empty-cells:show;
border-collapse:separate!important;
border-collapse:collapse;
}
input,select,textarea{
font:12pxTahoma,Verdana;
color:#333333;
font-weight:normal;
background-color:#F5FBFF;
border:1pxsolid#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>
</head>
<BODY>
<ScriptLanguage=JavaScript>
/********************************************************
*ProgressBarclass
*@authornull
*@paramwidth-widthofprogressbar
*@paramheight-heightofprogressbar
*@paramfgColor-fgColorofprogressbar
*@parambgColor-bgColorofprogressbar
*@paramborderColor-borderColorofprogressbar
theruleisthesameborder-colorofCSS
/********************************************************/
functionProgressBar(width,height,fgColor,bgColor,borderColor){

if(borderColor==undefined){
bgColor=threedlightshadow;
fgColor=highlight;
borderColor=buttonshadowwindowwindowbuttonshadow;
}
elseif(borderColor==undefined&&fgColor==undefined&&bgColor==undefined){
bgColor=threedlightshadow;
fgColor=highlight;
borderColor=buttonshadowwindowwindowbuttonshadow;
}

percent=0.0;//initializetozero
fontSize=Math.ceil(height/2)+1;

font_bt=<tablewidth=100%height=100%cellpadding=0cellspacing=0style=font:bold+fontSize+pxArial;color:+bgColor+;text-align:center;vertical-align:center;><tr><td>+parseInt(percent*100)+%</td></tr></table>;
font_ft=<tablewidth=100%height=100%cellpadding=0cellspacing=0style=font:bold+fontSize+pxArial;color:+fgColor+;text-align:center;vertical-align:center;><tr><td>+parseInt(percent*100)+%</td></tr></table>;

squares=;
for(vari=0;;i++){
varleft=width-2-i*(height/2+1);
//alert(left);
if(left>=height/2+1){
squares+=<spanstyle=background-color:+fgColor+;width:+height/2+px;height:+(height-2)+;margin-right:1px;></span>;
}
elseif(left>=1){
squares+=<spanstyle=background-color:+fgColor+;width:+left+px;height:+(height-2)+;margin:0px;></span>;
}
else
break;
}

//position:absolute;
str=<spanid=progress_bgstyle=width:+width+px;height:+height+px;background-color:+bgColor+;border:1pxsolid;border-color:+borderColor+>;//+fgColor+#transparent
str+=<spanid=progress_fgstyle=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+=<spanid=progress_btstyle=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+=<spanid=progress_ftstyle=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);
1234下一页阅读全文


评论


亲,登录后才可以留言!