您的位置:首页 > Web前端 > JQuery

CheckBoxList 全选(jquery版本)

2014-04-07 14:11 281 查看
function selectedAll(allselect, obj) {
$("#"+obj.id+" input:checkbox").each(function () {
if (allselect.checked)
$(this).attr("checked", true);
else {
$(this).attr("checked", false);
}
});
}


调用

<input id="allCheck" onclick="selectedAll(this, document.getElementById('cbl_cg'))" type="checkbox" name="allCheck" />全选/反选
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: