fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> </head> <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>
运行结果