js-去掉回车和空格
var str = text_name.replace(/\ +/g,""); str = str.replace(/[\r\n]/g,""); console.log(str);
长风破浪会有时,直挂云帆济沧海!
可通过下方链接找到博主
https://www.cnblogs.com/judes/p/10875138.html
var str = text_name.replace(/\ +/g,""); str = str.replace(/[\r\n]/g,""); console.log(str);