[英]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.