I have a button in html called btnS:
<button type="submit" id="btnS" class="hide" value="button">Send</button>
That I disabled with dom via external script dom:
btnS.setAttribute('disabled', 'false');
I tried to get it “back on” again via:
btnS.setAttribute('enabled', 'true');
But that didn’t work? The button was first invisible via a css rule:
.hide {
visibility : hidden;
}
And I changed that as well before with :
btnS.setAttribute('class', 'show');
Rule:
.show { visibility:visible; }
There is only one attribute: