<html>
<body>
Checkbox: <input type="checkbox" id="myCheck">
<button onclick="disable()">Disable checkbox</button>
<button onclick="undisable()">Undisable checkbox</button>
<script>
function disable() {
document.getElementById("myCheck").disabled = true;
}
function undisable() {
document.getElementById("myCheck").disabled = false;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_checkbox_disabled3 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:17:15 GMT -->
</html>