str = str.replace(/\s*/g,""); 注:https://www.cnblogs.com/a-cat/p/8872498.html https://www.cnblogs.com/jun-qi/p/11057421.html