javascript中使用replaceAll()函数实现字符替换的方法
而str.replace(/\-/g,"!")则可以全部替换掉匹配的字符(g为全局标志)。 replace() The replace() method returns the string that results when you...
而str.replace(/\-/g,"!")则可以全部替换掉匹配的字符(g为全局标志)。 replace() The replace() method returns the string that results when you...