js去除字符串中的所有空格(包括前后,中间存在的所有空格)

js去除字符串中的所有空格:

obj.replace(/\s/g,"");

感觉很好用。

猜你喜欢

转载自www.cnblogs.com/shaozhu520/p/10819581.html