参考:
http://www.jb51.net/article/48361.htm
http://blog.csdn.net/ge_zhiqiang/article/details/7610002
var app_value =[];
var spCodesTemp=‘‘;
$(‘input:checkbox[name=app]:checked‘).each(function(i){
//放到一个数组中
app_value.push($(this).val());
//将值放入一个字符串中
if(0==i){
spCodesTemp = $(this).val();
}else{
spCodesTemp += (","+$(this).val());
}
});
注意:checbox名称不需要写"[]"
时间: 2024-10-28 14:15:58