How can I select all checkboxes from all the pages in a jQuery DataTable

前端 未结 6 2061
既然无缘
既然无缘 2020-11-29 05:11

I have HTML page which have multiple checkboxes and individually they can be checked. I have button for \"Select All\" and when I click on this button all the check

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 05:55

    Try This,

       if ($(this).hasClass('allChecked')) {
         $('input[type="checkbox"]').prop('checked', 'checked')
       } else {
         $('input[type="checkbox"]').prop('checked', 'false')
       }

提交回复
热议问题