javascript - jquery selected how to select Checked checkboxes? -
this question has answer here:
in html table have checkboxes colums following markup:
<input type="checkbox" id="selection_2012-10-01-lin-c" class="selections" name="selection_checkbox" disabled="disabled"> <input type="checkbox" checked="checked" id="selection_2012-10-01-ade-c" class="selections" name="selection_checkbox"> on button click need validate if of check boxes selected, m using following code , getting false:
var selectedlots = $('input[name^="selection_checkbox"]').prop("checked"); requriement count of selected checkboxes or true, please guide me how select this.
thanks
"requriement count of selected checkboxes"
var count = $('input[name^="selection_checkbox"]:checked').length; "or true"
var anychecked = $('input[name^="selection_checkbox"]:checked').length > 0; // or var anychecked = $('input[name^="selection_checkbox"]').is(':checked'); more information in doco:
Comments
Post a Comment