http://expert.csdn.net/expert/faq/faq_index.asp?id=44636

解决方案 »

  1.   


    用vml写的进度条
    -------------------------------------------
    <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> 
    <!--[if !mso]> 
    <style> 
    v\:* { behavior: url(#default#VML) } 
    o\:* { behavior: url(#default#VML) } 
    .shape { behavior: url(#default#VML) } 
    </style> 
    <![endif]--> <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    <script lanuage="javascript">
    var pos1=1,posall=200  //定义全局变量,pos1为当前进度,posall为总进度
    var stopflag=0;
    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)+")"
    //    location.href="Coordinate.asp?flag=1&totalstr="+param1+"&partstr="+param2;
        document.all("showinfo").style.display="none";
        document.all("showpic").style.display="";
      }
      a.style.width=Math.round(300/(posall/pos1));
      jindu.innerText=Math.round(100/(posall/pos1))+"%"
      fill1.angle=Math.round(300/(posall/pos1))
    }
    function loaddata()
    {
      setInterval("play1()",50);
    }
    </script></head><body onload="loaddata();">
    <div id="showinfo" name="showinfo" style="display:">
       <v:RoundRect id='a' style='position:absolute;left:300;top:250;height:29;'>
         <v:Textbox inset='5px,5px,5px'><b><font size='2' color='red' id='jindu'></font></b></v:textbox>
         <v:fill type='gradient' id='fill1' color='blue'/>
        </v:RoundRect>
     </div><p>
    <div id="showpic" name="showpic" style="display:none">
    <img border="0" src="file:///C:/Documents%20and%20Settings/Administrator/桌面/饼图形状1.bmp" width="381" height="142">
    </body></html>