//全选
        function choose() {
            $("input:checkbox").prop("checked","checked");
        }
        //反选
        function reverse() {
            $("input:checkbox").each(function () {
                //
             var c = $(this).prop("checked");
                $(this).prop("checked",!c);

            })
        }
        /*删除*/
        function del() {
           // var ids = "";
            var ids=[];
            $("#list_table").find("input:checked").each(function (index,item){
                var cid = $(this).val();
               // var cid = item.val();
               ids.push(cid);
            });
            alert(ids);
$.ajax({ type:
"post", url:"${pageContext.request.contextPath}/cust/del", data:{"_method":"delete","ids":ids}, success:function () { window.location.href="${pageContext.request.contextPath}/cust/list"; }, error:function () { alert("失败"); } }); }

 

posted on 2019-11-26 14:52  我变秃了但还没变强啊  阅读(331)  评论(0编辑  收藏  举报