So I have a button like this:
<input id="Button" type="button" value="+" style="background-color:grey" onclick="Me();"/>
How can I disable and enable it when I want? I have tried disabled="disable" but enabling it back is a problem. I tried setting it back to false but that didn't enable it.
12 Answers
Using Javascript
Disabling a html button
document.getElementById("Button").disabled = true;Enabling a html button
document.getElementById("Button").disabled = false;