编辑下面的代码:【加编码】
<html> <body> <h3>访问 FIELDSET 元素</h3> <fieldset id="myFieldset" name="personalia"> 用户名: <input type="text" name="username"><br> Email: <input type="text" name="usermail"><br> </fieldset> <p>点击按钮禁用 fieldset。</p> <button onclick="myFunction()">尝试一下</button> <script> function myFunction() { var x = document.getElementById("myFieldset") x.disabled = true; }; </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂