I have a Table. In this table, the user can select all. or 3-4 records can be selected. What I need to do is to get the ids of the records he chose, but I couldn't do that.
HTML TABLE
<table id="kisitListesi" class="table mb-0 table-center">
<thead>
<tr>
<th class="border-bottom text-start py-3"><input id="kisitselectall" type="checkbox" /> Tümünü Seç</th>
<th class="border-bottom text-start py-3">Şirket</th>
<th class="border-bottom text-start py-3">Kullanıcı</th> <th class="border-bottom text-start py-3">Kısıt</th>
<th class="border-bottom text-center py-3">Diğer</th>
</tr>
</thead>
<tbody>
@foreach (var item in AdminStatic.stokKisitiOlanKullanicilar())
{
<tr class="shop-list">
<td class="border-bottom text-start py-3"><input class="kisitsec" data-idd="@item.ID" type="checkbox" /></td> <td>@AdminStatic.GetKullaniciIsletme(Convert.ToInt32(item.Isletme)).IsletmeAdi</td>
<td>@item.AdSoyad</td>
<td>@item.Kisit</td>
<td class="text-center">
<span class="badge rounded-pill bg-success">
<a style="color:white; margin:auto;" href="javascript:void(0)" onclick="KisitDuzenle(@item.ID">
<i class="uil uil-edit"></i>
</a>
</span>
<span class="badge rounded-pill bg-danger">
<a style="color:white; margin:auto;" href="javascript:void(0)"onclick="@item.ID">
X
</a>
</span>
</td>
</tr>
}
</tbody>
</table>
JAVASCRİPT
function seciliDatalar() {
var result = [];
$('input:checkbox:checked').each(function (item) {
result.push($(".kisitsec").attr("data-idd"));
});
alert(result)
}