itamu

//去掉回车换行   str = str.replace(/[\r\n]/g,"");

 

//去掉空格   str = str.replace(/\ +/g,"");

 

str 为存放了需要处理的内容的字符串

 

分类:

技术点:

相关文章: