I want to enable/disable a button without jquery. Here\'s my code:
btn.setAttribute(\"disabled\", true);
Works. But this doesn\'t -- a butt
element.disabled = true element.disabled = false
This is perfectly valid and works as you'd expect - i.e. does not disable the element when set to true as the accepted answer suggests.