<script> $('input[type=checkbox]').click( function () { $('span#cheak_len').empty(); var len = $("input[name=product_bound_id]:checkbox:checked").length; $('span#cheak_len').append(len); } ) </script>
<!--全选--> <label for="exampleInputEmail2">全选</label> <input type="checkbox" class="allAndNotAll"> 共选中<span id="cheak_len">0</span>条 <!-- 单个选框--> <td><input type="checkbox" value="{{ data.id }}"name="product_bound_id" id="inlineCheckbox1"></td>