js字符串去掉回车和空格

var str = text_name.replace(/\ +/g,"");
str = str.replace(/[\r\n]/g,"");
posted @ 2020-09-22 13:39  朱小勇  阅读(2738)  评论(0)    收藏  举报