zoukankan      html  css  js  c++  java
  • js EasyUI前台 全选的实现

    在页面数据列表<d:table>

                       </d:table>   加入代码

     <d:col style="45"   class="display_leftalign"  title="选择<input type="checkbox" id="checkAll"/>">
          <input type="checkbox" name="Id" id="Id" class="checkItem" value="${row.id}"/>
     </d:col> 

    js全选效果的实现

    $(document).ready(function(){
            var chk_options = { 
                all:'#checkAll',
                item:'.checkItem'
            };
            $(this).chk_init(chk_options);
        });
    function inputs(id){
        /*     var strChk="";
                var chkObj = $("input[@type=checkbox]:checked");
                        $.each(chkObj, function(i,item){
                            if($(item).val()!='on' && $(item).val()!=''){
                           strChk += ($(item).val()+",");  
                           }
                        });
            if($("input[@type=checkbox]:checked").size()==0){
                top.easyAlert('提示信息','请勾选要发送OA的记录!','info');
            }else{
                top.easyConfirm('提示', '确定发送?', function(r){
                    if (r){
                        $('#queryForm').attr("action","report-apple!commitAllReport.action");
                        $('#queryForm').submit();
                    }
                });        
            } */
            if($("input[@type=checkbox]:checked").size()==0){
                top.easyAlert('提示信息','请勾选要发送OA的记录!','info');
                return;
            }
            if($("input[@type=checkbox]:checked").size()>1){
                top.easyAlert('提示信息','只能勾选一条记录!','info');
                return;
            }
            $('#queryForm').attr("action","report-apple!commitAllReport.action");
            $('#queryForm').submit();
    }

     后台  接受ID,,或者ID[] 数组即可

  • 相关阅读:
    C/C++的64为长整型数的表示
    二分图带权匹配 KM算法与费用流模型建立
    常见的排序算法比较及总结
    个人联系方式
    (1) linux 3.x
    (4) linux 3.x
    (3) linux 3.x
    (2) linux 3.x
    (1) linux 3.x
    (3) linux 3.x
  • 原文地址:https://www.cnblogs.com/aGboke/p/5524737.html
Copyright © 2011-2022 走看看