摘要: 字符串去掉所有空格 "abc 123 def".replace(/\s/g, "") 字符串去掉左右两端空格 " abc 123 def ".replace(/(^\s*)|(\s*$)/g, ""); 字符串去掉左边空格 " abc 123 def ".replace(/(^\s*)/g,""); 阅读全文
posted @ 2017-10-23 11:09 成忠 阅读(333) 评论(0) 推荐(0) 编辑