运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <p>Peter's score: <meter id="myMeter" value="0.3" high="0.9" low="0.1" optimum="0.5"></meter></p> <p>Click the button to return the value of the optimum attribute of the gauge above.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { let x = document.getElementById("myMeter").optimum; document.getElementById("demo").innerHTML = x; } </script> </body> </html>