转义textarea回车读取(/n)符号

javascript

浏览数:269

2019-1-7

var strong = strong.replaceAll('\n', '
'); String.prototype.replaceAll = function(s1,s2){ return this.replace(new RegExp(s1,"gm"),s2); };