<html>
<body>
<h3>A demonstration of how to access a FIELDSET element</h3>
<fieldset id="myFieldset" name="personalia">
Name: <input type="text" name="username"><br>
Email: <input type="text" name="usermail"><br>
</fieldset>
<p>Click the button to disable the fieldset.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
var x = document.getElementById("myFieldset");
x.disabled = true;
}
</script>
</body>
</html>