【发布时间】:2021-09-04 14:20:47
【问题描述】:
蛋糕制作
下巴制作
制作油炸圈饼
豌豆制作
包子制作
蛋羹制作
【问题讨论】:
标签: html
【问题讨论】:
标签: html
你可以用 jQuery 做到这一点
$('input[type=checkbox]').on('change', function (e) {
if ($('input[type=checkbox]:checked').length > 3) {
$(this).prop('checked', false);
alert("allowed only 3");
}
});
或者在原版js中https://www.plus2net.com/javascript_tutorial/checkbox-limit.php
【讨论】: