javascript replaceall

1.str.replace(/oldString/g,newString)

2.str.replace(newRegExp(oldString,"gm"),newString)

3.增加String对象原型方法replaceAll

相关推荐