<html>
<body>
<input type="button" id="myBtn" value="My Button">
<br>
<button onclick="disableBtn()">Disable "My Button"</button>
<button onclick="undisableBtn()">Undisable "My Button"</button>
<script>
function disableBtn() {
document.getElementById("myBtn").disabled = true;
}
function undisableBtn() {
document.getElementById("myBtn").disabled = false;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_button_disabled3 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:17:14 GMT -->
</html>