js 去掉前后空格(正则表达式方法)

  • 代码:
'  aaa '.replace(/(^\s*)|(\s*$)/g, '')

posted on 2018-04-12 16:59  cag2050  阅读(448)  评论(0编辑  收藏  举报

导航