Jquery怎么获得复选框被选中的个数? - Web 开发 / Ajax
想要得到被选中的数量
用循环可以做,需要挨个去判断是否checked
jquery有没有更简单的方法?
[解决办法]
<script src="js/jquery-1.3.2.js"></script><script>function doit(){ alert($("input[name='ChooseOne']:checked").length);}</script><input type="checkbox" name="ChooseOne" ><input type="checkbox" name="ChooseOne" ><input type="checkbox" name="ChooseOne" ><input type="checkbox" name="ChooseOne" ><input type="checkbox" name="ChooseOne" ><input type="button" value="get" onclick="doit()">
[解决办法]
简单的还是用js来实现吧
接分咯