运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往空间
<!DOCTYPE html> <html> <body> Downloading progress: <progress id="myProgress" value="22" max="100"> </progress> <p>Click the button to get the current position of the progress bar.</p> <p>The value returned by this property is the result of dividing the current value (22) by the maximum value (100).</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myProgress").position; document.getElementById("demo").innerHTML = x; } </script> </body> </html>