js去掉字符串空格
String.prototype.trim=function() {
return this.replace(/(^\s*)|(\s*$)/g,'');
}
posted on 2016-03-30 10:05 lianruihong 阅读(131) 评论(0) 收藏 举报
String.prototype.trim=function() {
return this.replace(/(^\s*)|(\s*$)/g,'');
}
posted on 2016-03-30 10:05 lianruihong 阅读(131) 评论(0) 收藏 举报