编辑下面的代码:【加编码】
<html> <body> <p>点击按钮创建带有指定值的 METER 元素。</p> <button onclick="myFunction()">尝试一下</button> <p><b>注意:</b>Internet Explorer 和 Safari 5(及其之前的版本)不支持 meter 对象。</p> <script> function myFunction() { var x = document.createElement("METER"); x.setAttribute("min", "0"); x.setAttribute("max", "100"); x.setAttribute("value", "65"); document.body.appendChild(x); }; </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂