Created
August 6, 2020 07:43
-
-
Save simofacc/8b42c5835114963b0e21f7adba9da786 to your computer and use it in GitHub Desktop.
Tick multiple checkboxes and trigger onChange event
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll("input[type=checkbox]").forEach(c => { c.checked = true; c.onchange(); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment