原生JS正则去除所有空格

function removeAllSpace(str) {
    return str.replace(/\s+/g, "");
}

猜你喜欢

转载自blog.csdn.net/qq_40429151/article/details/83012376
今日推荐