js去除字符串所有空格

str = str.replace(/\s+/g,"");

 

posted @ 2023-06-02 08:11  丙炎  阅读(17)  评论(0)    收藏  举报