js去掉首位空格的正则表达式


去掉首位空格

复制代码 代码如下:

str=str.replace(/^\s+|\s+$/g,'');


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3