JS去掉指定字符串

JS去掉指定字符串

可以用字符串替换函数replace吧,str="1831,1829,1812,1829,134,171"str=str.replace("1812,","")至于去掉首尾,我想到的
JavaScript180