2.源码

<html> <head> <script type="text/javascript"> window.onload = function () { var myProgress = document.getElementById("myProgress"); var mySpan = document.getElementById("mySpan"); var value = myProgress.value; mySpan.innerText = value + "%"; var ID = setInterval(function () { value = myProgress.value; if (value < 100) { value += 10; myProgress.value = value; mySpan.innerText = value + "%"; } if (value == 100) { clearInterval(ID); } }, 500); } </script> </head> <body> <label for="myProgress">进度条</label> <progress id="myProgress" value="0" max="100"></progress> <span id="mySpan"></span> </body> </html>

上面是我整理给大家的,希望今后会对大家有帮助。

相关文章:

利用H5特性FormData实现不刷新文件上传

各种AJAX方法的使用比较详解

浅析IE针对Ajax请求结果的缓存问题