JavaScript使用replace替换'\\'

单个"\"代表转义字符,输出为空,使用split和replace皆无效

str.replace(/\\/g, ' ')

 
posted @ 2021-04-13 23:43  yongerbingxuan  阅读(2052)  评论(0)    收藏  举报