dyjh 6 роки тому
батько
коміт
d900720a7a
1 змінених файлів з 5 додано та 6 видалено
  1. 5 6
      resources/views/admin/album/agent/index.blade.php

+ 5 - 6
resources/views/admin/album/agent/index.blade.php

xqd xqd
@@ -55,7 +55,7 @@
 						<tbody>
 						@if(isset($list))
 							@foreach($list as $key => $item)							<tr>
-								<td><input id="{{ $item->id }}" class="checkItem" type="checkbox"></td>
+								<td><input id="{{ $item->id }}" class="checkItem" name="checkItem" type="checkbox"></td>
 								<td>{{ $item->id }}</td>
 								<td>{{ $item->nickname }}</td>
 								<td>{{ $item->name }}</td>
@@ -122,11 +122,10 @@
 </div>
 <script>
 	$(".checkItem").click(function () {
-        if ($(this).prop('checked')) {
-            alert('111');
-        } else {
-            alert('222')
-		}
+        $("input:checkbox[name='checkItem']:checked").each(function () {
+			alert($(this).id);
+        })
+
     })
 
 </script>