js 特殊字符替换成换行

var str = str.replace(/@@/g,"\n");

其中@@是需要替换的字符

猜你喜欢

转载自www.cnblogs.com/greatdynasty/p/11468283.html