progress 标签定义运行中的任务进度(进程)。
50%进度
不确定进度
3.创建PROGRESS
<!DOCTYPE html> <html> <head> <title>progress</title> <meta charset="utf-8"> </head> <body> <script type="text/javascript"> function myFunction() { var x=document.createElement("PROGRESS"); x.setAttribute("value","80"); x.setAttribute("max","100"); document.body.appendChild(x); } </script> <body> 创建PROGRESS: <button onclick="myFunction()" id="myprogress">创建</button> </body> </html>4.使用Position属性
<!DOCTYPE html> <html> <head> <title>progress</title> <meta charset="utf-8"> </head> <body> <script> function myFunction() { var x = document.getElementById("myProgress").position; document.getElementById("demo").innerHTML = x; } </script> <body> <p>下载进度条:</p> <progress id="myProgress" value="50" max="100"></progress> <p id="demo"></p> <button onclick="myFunction()">获取进度值</button> </body> </html>HTML5 progress元素的样式控制、兼容与实例
转载于:https://www.cnblogs.com/masai1969/p/4355703.html
