var str = text_name.replace(/\ +/g,"");
str = str.replace(/[\r\n]/g,"");

相关文章: