//去掉前后空格
str.trim();
//去掉所有空格(前后以及中间)
str.replace(/\s/g,"");
js去空格的两种方法
猜你喜欢
转载自blog.csdn.net/wangzhichaogege/article/details/107929403
今日推荐
周排行