一次 replace只能替换一个,例如: var str = 'test test test test' console.log(str.replace('test', 'tester')) 通过正则可以一下替换全部: someString = 'the cat looks like a cat';… Read More