js去除字符串两端空格

 remark.replace(/^\s\s*/, '').replace(/\s\s*$/, '').length==0

 

posted @ 2014-12-20 16:49  clown丶悠哈  阅读(100)  评论(0)    收藏  举报