var testString = "123456789" testString.replace("1","000") console.log(testString)
testString = testString.replace("1","000");
linxuyang 如果字符串中有很多个 1 怎么一下全部替换完呢?
linxuyang testString =testString .replace(/1/g,"000")