[英]How to Check CheckBox in html table when data is coming from Database? in asp.net MVC
[英]How we can choose only 4 from a group of checkbox when the data is coming from the database
當用戶嘗試從復選框組中選擇四個以上的值(復選框名稱位於數組中)時,我想顯示JavaScript警報
<div class="checkbox alert alert-primary">
<p><input type="checkbox" id="calorieCheckbox" name="txt_tradesman[]" value="<?php echo $restrad['tradesman_id'] ?>" onClick="return KeepCount()"><?php echo $restrad['fullname'] ?> <p>
</div>
這是jQuery版本:
$('[[name =“ txt_tradesman []”]:checked')。length
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.