JavaScript check all checkboxes from querySelectorAll result
Use querySelectorAll with forEach to check checkboxes.
document.querySelectorAll('[type=checkbox]').forEach((checkbox) => {
checkbox.checked = true;
});
Use querySelectorAll with forEach to check checkboxes.
document.querySelectorAll('[type=checkbox]').forEach((checkbox) => {
checkbox.checked = true;
});
Comments
Leave a Reply