$("#all").on("click",function(){
	var ids1 = [];//数组
	var ids2 = '';//字符串
 	var checks=$("input[type='checkbox']")
	checks.each(function(){
		$(this).prop("checked",true);//批量选中
		ids1.push($(this).val());
		ids2 += (","+$(this).val());
	})
	
	console.log(ids1);
	console.log(ids2.substring(1));
});