Answers for "how to uncheck all checkbox in javascript"

11

javascript check uncheck checkbox

document.getElementById("myCheckBoxID").checked = true; // Check
document.getElementById("myCheckBoxID").checked = false;// Uncheck
Posted by: Guest on August-02-2019
0

uncheck all checkboxes typescript

html
<input #checkboxes type="checkbox">
...
<button type="button" (click)="uncheckAll()"></button>

ts file
@ViewChildren("checkboxes") checkboxes: QueryList<ElementRef>;

uncheckAll() {
  this.checkboxes.forEach((element) => {
    element.nativeElement.checked = false;
  });
}
Posted by: Guest on April-05-2021

Code answers related to "how to uncheck all checkbox in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language