progress>"."/> progress>".">
Home > Article > Web Front-end > How to implement progress bar in html
In HTML, you can use the progress tag to implement a progress bar. This tag can define the progress of a running task (process). Use the syntax "".
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
下载进度: <progress value="22" max="100"> </progress>
Rendering:
Description: The
<progress id='progress1' value="0" max="100"> </progress> <button onclick="start_run(100)">下载</button> <script> function start_run(n) { if(n==0){alert("下载完成")} var progress1=document.getElementById("progress1") n=n-1 cur_task=100-n progress1.value=cur_task setTimeout("start_run("+n+")",100) } </script>
Rendering:
Programming video! !
The above is the detailed content of How to implement progress bar in html. For more information, please follow other related articles on the PHP Chinese website!