JQuery对checkbox全选/取消全选




$(document).ready(function(){
$("#qx").click(function() {
if ($(this).attr("checked") ==true) {
//全选
$("input[name='yf']").each(function(){
$(this).attr("checked",true)
});
} else {
// 取消全选
$("input[name='yf']").each(function() {
$(this).attr("checked",false);
});
}
});
});



选择月份
全选
1月
2月
3月
4月
5月
6月
7月
8月
9月
10月
11月
12月


网站名称:JQuery对checkbox全选/取消全选
URL地址:http://ybzwz.com/article/gessio.html