checkbox全选实例
来源:互联网 发布:建材网发布软件 编辑:程序博客网 时间:2024/05/17 08:39
<c:if test="${!empty mobiles }"> <tr> <td colspan="1" class="field" style="width:70px;" >移动<input type="checkbox" id="mobileall"/>:</td> <td colspan="3"> <c:forEach items="${mobiles}" var="mobile"> <input type="checkbox" name="productId" value="${mobile.id }" class="mobilepid"/> <span>移动${mobile.packageSize}M</span> </c:forEach> </td> </tr> </c:if>
$(function(){$("#mobileall").click(function (){$(".mobilepid").prop("checked",this.checked);getDatapackageIds();});$(".mobilepid").click(function() { var $subs = $(".mobilepid"); $("#mobileall").prop("checked" , $subs.length == $subs.filter(":checked").length ? true :false); getDatapackageIds();});});function getDatapackageIds(){/* var $productId = $("input[name='productId']:checked"); var productIds ="";if($productId.length > 0){for(var i = 0; i < $productId.length;i++){alert($productId[i]);alert($productId[i].val());//productIds += $productId[i].val();}}alert(productIds); */var datapackageIds ="";$("input[name='productId']:checked").each(function(){datapackageIds += $(this).val()+",";});$("#productLimit").val(datapackageIds); }
0 0
- 全选checkbox实例
- checkbox全选实例
- js 完成checkbox 全选与复选[实例]
- JQuery checkbox全选,反选实例
- checkbox全选
- checkbox全选
- checkbox全选
- checkbox 全选
- CheckBox全选
- checkbox全选
- checkbox 全选
- checkbox全选
- checkbox 全选
- checkbox全选
- checkbox 全选
- 全选(CHECKBOX)
- checkbox全选
- checkBox全选
- Nginx配置总结
- 61单片机项目 - FIQ中断
- nyoj84阶乘的0
- nginx安装出错
- adapter.notifyDataSetChanged()使用没有效果的解决办法。
- checkbox全选实例
- jetty meven eclipse集成总结
- Android Intent 用法全面总结
- Linux内核中的常用宏container_of其实很简单
- 关于ggplot改变背景报错的问题
- url参数中出现+,&,?,',%,#,=,空格等字符的解决方法
- 在Ubuntu 14.04 64bit上安装redis 3.0.3
- 蓝懿教育 复杂版计算器的实现
- In与Exists的区别2