天天看點

jquery全反選

$("#checkedAll").click(function() { 
			
			
			if ($(this).attr("checked") == 'checked') { // 全選 
				
			$("input[name='items']").each(function() { 
			$(this).attr("checked", true); 
			}); 
			} else { // 取消全選 
			$("input[name='items']").each(function() { 
			$(this).attr("checked", false); 
			});
			};
			});