开发者

How to count CheckBoxList checked using Jquery

开发者 https://www.devze.com 2023-03-12 18:25 出处:网络
I have search with the following keyword but couldn\'t find. javascript CheckBoxList api jquery CheckBoxList check开发者_Python百科ed countThe following should give you the total number of checked c

I have search with the following keyword but couldn't find.

javascript CheckBoxList api

jquery CheckBoxList check开发者_Python百科ed count


The following should give you the total number of checked checkboxes on the page

var count = $(':checkbox:checked').length;

If you want to restrict it only to a given CheckBoxList you could assign this checkboxlist some class and then:

var count = $('.someClass :checkbox:checked').length;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号