Tips & Tutorials

5 Ways to Disable Elements In An HTML DIV

Welcome to a tutorial on how to disable elements inside an HTML DIV. To quickly disable all form elements in an HTML DIV, we can get the elements using the query selector and disable them accordingly: var all = document.querySelectorAll(“#container select, #container input, #container textarea, #container button”); for (let el of all) { el.disabled = …

5 Ways to Disable Elements In An HTML DIV Read More »