For example, I could have a HTML form like this:
<form>
<fieldset disabled>
<!-- inputs here -->
</fieldset>
</form>
How can I use JavaScript to add or remove the disabled attribute?
For example, I could have a HTML form like this:
<form>
<fieldset disabled>
<!-- inputs here -->
</fieldset>
</form>
How can I use JavaScript to add or remove the disabled attribute?
Give this a go:
document.getElementsByTagName("fieldset")[0].removeAttribute("disabled");