$(function(){
$("#check").click(function () {
// 全选中
if (this.checked) {
$("input:checkbox").each(function () {
$(this).prop("checked", true);
});
} else {
// 全不选中
$("input:checkbox").each(function () {
$(this).prop("checked", false);
});
}
});
});
博客围绕input checkbox的全选功能展开,虽未给出具体内容,但可知与该功能相关,input和checkbox是前端开发常用元素,全选功能在表单等场景有重要应用。
1339

被折叠的 条评论
为什么被折叠?



