var str = 'aa dd c dddd e';
str = str.replace(/\s+/g, ' ');//将字符串里的多个连续空格替换成一个空格
转载于:https://www.cnblogs.com/licurry/p/9612972.html
var str = 'aa dd c dddd e';
str = str.replace(/\s+/g, ' ');//将字符串里的多个连续空格替换成一个空格
转载于:https://www.cnblogs.com/licurry/p/9612972.html