0

I have below html table.

<table>
<tr>
<td>
Delete:<br><input type="checkbox" id="deleteCheckOne" class="deleteCheck" name="delete" value="0">
</td>
<td>
Delete:<br><input type="checkbox" id="deleteCheckTwo" class="deleteCheck" name="delete" value="0">
</td>
</tr>
</table>

Now using JQuery i have to find the checked count of the class deleteCheck using JQuery.

How can i fine the count of number of checked checked boxes using JQuery>

Thanks!

4

4 回答 4

3
$('.deleteCheck:checked').length
于 2013-08-16T12:16:21.177 回答
1

您可以使用:checked选择器仅查找checked输入,并使用length属性找出其中的许多。

var checkedCount = $('.deleteCheck:checked').length;
于 2013-08-16T12:16:36.793 回答
0

可以选择选中的行:checkedlength为您提供计数,这将有所帮助

$('.deleteCheck:checked').length;
于 2013-08-16T12:17:34.830 回答
-1

使用选择器

$('input:checkbox:checked.deleteCheck').length;
于 2013-08-16T12:17:36.713 回答