去除所有空白符

去除所有空格,换行符

name.replace(/s+/g,"")
原文地址:https://www.cnblogs.com/zhangrenjie/p/14205928.html