前端删除部分代码

 //全选
        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("失败"); } }); }
原文地址:https://www.cnblogs.com/chen4j/p/11935446.html