Answers for "checkbox when checked check all checkboxes"

-1

checkbox on click jquery select all

$("#checkAll").click(function(){
    $('input:checkbox').not(this).prop('checked', this.checked);
});
Posted by: Guest on October-03-2020
0

when i click on one checkbox check all checkboxes

function setAllCheckboxes(divId, sourceCheckbox) {
    divElement = document.getElementById(divId);
    inputElements = divElement.getElementsByTagName('input');
    for (i = 0; i < inputElements.length; i++) {
        if (inputElements[i].type != 'checkbox')
            continue;
        inputElements[i].checked = sourceCheckbox.checked;
    }
}
Posted by: Guest on November-27-2020

Code answers related to "checkbox when checked check all checkboxes"

Code answers related to "Javascript"

Browse Popular Code Answers by Language