字符串去空格

方法一.正则

var str="str 132 ff";
var re=/s/g;
alert(str.replace(re,""));
原文地址:https://www.cnblogs.com/zhangwenkan/p/4248245.html