function arrToIds(arr){ var new_ids = ''; for(i=0;i<arr.length;i++){ new_ids += ','+arr[i]; } if(new_ids!=''){ new_ids = new_ids.substr(1); } return new_ids; }
js 把数组里面的id拼接成用逗号拼接的ids字符串
最新推荐文章于 2023-12-06 09:41:24 发布
function arrToIds(arr){ var new_ids = ''; for(i=0;i<arr.length;i++){ new_ids += ','+arr[i]; } if(new_ids!=''){ new_ids = new_ids.substr(1); } return new_ids; }