JS執行個體之進度條製作,實現進度條讀條效果

來源:互聯網
上載者:User

標籤:color   val   class   height   20px   order   logs   style   blog   

 1 <head> 2 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 3 <title>無標題文檔</title> 4 <style type="text/css"> 5 *{margin:0px auto; padding:0px;} 6 #wai{width:200px; height:20px; margin-top:100px; border:1px solid #666;} 7 #nei{width:0%; height:20px; background-color:#F00; float:left;} 8 </style> 9 </head>10 11 <body>12     <div id="wai">13         <div id="nei"></div>14     </div>15     <input type="button" value="開始" onclick="zou()"/>16 </body>17 <script type="text/javascript">18 var a=0;19 function zou(){20     if(a<100){21         a++;22     }23     document.getElementById("nei").style.width =a+"%";24     window.setTimeout("zou()",5);25 }26 </script>27 </html>

 

JS執行個體之進度條製作,實現進度條讀條效果

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.