• 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[] 数组即可

  • 相关阅读:
    html(单纯html标签)
    python 知识点
    浅谈五大Python Web框架
    Python3的变化
    测试开发
    常见的测试用例设计方法
    数字数据类型及其对应转移字符
    char *p 与char p[]
    C语言运算符优先级 详细列表
    软件自动化测试
  • 原文地址:https://www.cnblogs.com/aGboke/p/5524737.html
Copyright © 2020-2023  润新知