Just set the disabled property to false in JavaScript, it will change the disabled attribute in HTML. If you set disabled property true then HTML elements will disable.
document.getElementById("myId").disabled = false;
JavaScript change disabled attribute value example
HTML example code will disable an input button.
<html>
<body>
<input id="dummy" type="button" value="Submit" />
</body>
<script>
var elem = document.getElementById('dummy');
elem.disabled = true;
</script>
</html>
Output:
Do comment if you have any doubts and suggestions on this topic.
Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.
OS: Windows 10
Code: HTML 5 Version