http://blog.csdn.net/ge_zhiqiang/article/details/7610002
获取所有name为spCodeId的checkbox
var spCodesTemp = "";
$("input:checkbox[name=spCodeId]:checked'").each(function(i){
if(0==i){
spCodesTemp = $(this).val();
}else{
spCodesTemp += (","+$(this).val());
}
});
$("#txt_spCodes").val(spCodesTemp);