Change a disabled button property

I have an html button and I dynamically disabled it using the following property values

disabled="disabled"

How can I make it work again? I do not want to disable it now

+3
source share
2 answers

You can simply set the disabledproperty to falsein JavaScript, for example:

document.getElementById("myId").disabled = false;
+9
source
var e = document.getElementById("someElement");
e.removeAttribute("disabled");

and disconnect again,

e.setAttribute('disabled','disabled');
+4
source

Source: https://habr.com/ru/post/1782277/


All Articles