dyjh 6 年之前
父节点
当前提交
8190af3279
共有 1 个文件被更改,包括 15 次插入2 次删除
  1. 15 2
      resources/views/admin/album/agent/index.blade.php

+ 15 - 2
resources/views/admin/album/agent/index.blade.php

xqd
@@ -121,12 +121,25 @@
 	</div>
 </div>
 <script>
-	$(".checkItem").click(function () {
+
+    var checkArr = [];
+    $(".checkItem").click(function () {
+        checkArr = [];
         $("input:checkbox[name=checkItem]:checked").each(function () {
-			alert($(this).attr("id"));
+            checkArr.push($(this).attr("id"))
         })
 
     })
 
+	$(".checkAll").click(function () {
+        $(".checkItem").each(function () {
+            if ($(this).prop('checked')) {
+                $(this).prop('checked',false)
+            } else {
+                $(this).prop('checked',true)
+            }
+		})
+    })
+
 </script>
 @endsection