Sometimes, we want to remove disabled attribute from HTML input with JavaScript.
In this article, we’ll look at how to remove disabled attribute from HTML input with JavaScript.
How to remove disabled attribute from HTML input with JavaScript?
To remove disabled attribute from HTML input with JavaScript, we set the disabled
property to false
.
For instance, we write
document.getElementById("my-input-id").disabled = false;
to select the input with getElementById
.
Then we set its disabled
property to false
to remove the disabled
attribute from the input.
Conclusion
To remove disabled attribute from HTML input with JavaScript, we set the disabled
property to false
.