Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<form>
  <fieldset id="myFieldset">
  <legend>Personalia:</legend>
  Name: <input type="text"><br>
  Email: <input type="text"><br>
  Date of birth: <input type="text">
  </fieldset>
</form>
<p>Click the button below to to disable the fieldset above.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
  document.getElementById("myFieldset").disabled = true;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_fieldset_disabled2 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 18:16:50 GMT -->
</html>