<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:12px;color:;}
</style>
</head>
<body topmargin='2' leftmargin='2'>
<div style='table-layout:fixed;width:100%;height:100%;border:1 solid black'>
<v:roundrect id='a' style='position:absolute;left:300;top:250;height:29;'>
<v:textbox inset='5px,5px,5px'><b><font color='red' id='jindu'></font></b></v:textbox>
<v:fill type='gradient' id='fill1' color='blue'/>
</v:roundrect>
</div>
<script>
//原作:风云舞,载自:http://www.lshdic.com/bbs
var pos1=1,posall=200 //定义全局变量,pos1为当前进度,posall为总进度
function play1(){ //播放函数
if(pos1<posall)pos1+=1;else{pos1=1;fill1.color="rgb("+math.round(math.random()*255)+","+math.round(math.random()*255)+","+math.round(math.random()*255)+")"}
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>