js怎样替换反斜杠

js怎样替换反斜杠

假设需要进行替换的字符串为str1,那么:str1.replace(\g,'\\')完整的例子:var str1 = 'a\b\c'var str2 = str1.replace
JavaScript140