去除字符串内所有的空格:str = str.replace(/\s*/g,""); 去除字符串内两头的空格:str = str.replace(/^\s*|\s*$/g,""); 去除字符串内左侧的空格:str = str.replace(/^\s*/,""); 去除字符串内右侧的空格:str = str.replace(/(\s*$)/g,"");
2021-01-22
2021-01-11
2021-01-21
2021-01-31
2021-05-12
2021-10-09
2021-06-28
2021-05-24
评论