我只想从此字符串中提取组
我想在警报“group1,group2”中有类似的东西,但它返回空。
var phone_nos = "group1,group2,564774890900";
var recipients = phone_nos.split(",");
for( var i=0; i<recipients.length; i++ )
group =recipients[i].substring(0,5)
{ if (group=="group")
{groups.push(recipients)}
}
alert(groups.join(","))