adsense

Tuesday, July 31, 2018

Get Total Checkboxes using jQuery

Suppose there are several check boxes which are either checked or unchecked. jQury can be used to easily get the number of all check boxes, checked and unchecked boxes as shown below.

var totalCheckboxes = $('input:checkbox').length;
var totalChecked = $('input:checkbox:checked').length;
var totalUnChecked = totalCheckboxes - totalChecked ;

 

Cheers,
Samitha

No comments:

Post a Comment