<HTML xmlns:v> <HEAD> <META http-equiv='Content-Type' content='text/html;charset=gb2312'> <Meta name='Gemeratpr' content='网络程序员伴侣(Lshdic)2004'> <TITLE>效果不错的VML进度条</TITLE> <STYLE> v\:*{behavior:url(#default#VML);} *{font-size:10px;color:;} </STYLE> </HEAD> <BODY topmargin='2' leftmargin='2'> <div style='table-Layout:fixed;width:100%;height:100%;border:1 solid #CCCCCC'> <v:RoundRect id='a' style='position:absolute;left:100;top:150;height:20;'> <v:Textbox inset='2px,2px,2px'><b><font color='#666666' id='jindu'></font></b></v:textbox> <v:fill type='gradient' id='fill1' color='#EEEEEE'/> </v:RoundRect> </div> <script> //原作:风云舞,载自:http://www.lshdic.com/bbs var pos1=1,posall=400 //定义全局变量,pos1为当前进度,posall为总进度 function play1(){ //播放函数 if(pos1<posall)pos1+=1;else{pos1=1;fill1.color="#EEEEEE"} a.style.width=Math.round(300/(posall/pos1));jindu.innerText=pos1+"/"+posall+","+Math.round(100/(posall/pos1))+"%" fill1.angle=Math.round(300/(posall/pos1)) } setInterval("play1()",10) //10毫秒播放一次,一般CPU保证能消化~~~ </script> </BODY> </HTML> [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]