js去除字符串中的空格

//去除空格
function Trime(string){
    return string.replace(/\s/ig,"");
}

 

posted @ 2018-05-24 16:55  存钱罐  阅读(212)  评论(0编辑  收藏  举报