Edit The Code:
See Result »
Try it Yourself - ©
w3big.com
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>本教程(w3big.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>