打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
EASYUI DATAGRID 多列复选框CheckBox
"; } } ]], onLoadSuccess: function () { $("#detailcheckbox").unbind(); $("#listcheckbox").unbind();
$("input[name='PL']").unbind().bind("click", function () { //总记录数 var totolrows = $("input[name='PL']").length; //选中的记录数 var checkrows = $("input[name='PL']:checked").length; //全选 if (checkrows == totolrows) { $("#listcheckbox").attr("checked", 'checked'); } else { $("#listcheckbox").removeAttr("checked"); }
$("#pllist").val(""); var items = $("input[name='PL']:checked"); var result = ""; $.each(items, function (index, item) { result = result + "|" + item.value; }); $("#pllist").val(result); }); $("input[name='PD']").unbind().bind("click", function () { //总记录数 var totolrows = $("input[name='PD']").length; //选中的记录数 var checkrows = $("input[name='PD']:checked").length; if (checkrows == totolrows) { $("#detailcheckbox").attr("checked", 'checked'); } else { $("#detailcheckbox").removeAttr("checked"); } $("#pdlist").val(""); var items = $("input[name='PD']:checked"); var result = ""; $.each(items, function (index, item) { result = result + "|" + item.value; }); $("#pdlist").val(result); }); //全选 $("#detailcheckbox").click(function () { if ($(this).attr('checked') == 'checked') { $("input[name='PD']").attr("checked", 'checked'); } else { $("input[name='PD']").removeAttr("checked"); } $("#pdlist").val(""); var items = $("input[name='PD']:checked"); var result = ""; $.each(items, function (index, item) { result = result + "|" + item.value; }); $("#pdlist").val(result); }); $("#listcheckbox").click(function () { if ($(this).attr('checked') == 'checked') { $("input[name='PL']").attr("checked", 'checked'); } else { $("input[name='PL']").removeAttr("checked"); } $("#pllist").val(""); var items = $("input[name='PL']:checked"); var result = ""; $.each(items, function (index, item) { result = result + "|" + item.value; }); $("#pllist").val(result); }); } }); }
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Jquery操作TreeView 父节点checkbox选中,子节点checkbox也选中
jquery实现 checkbox全选和反选 很常用噢....
jquery判断单选按钮是否选中
easyui dataGrid扩展
JQuery多选框全选
js原生、jquery单选框radio总结(获取值、设置默认选中值、样式)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服