2011年9月18日

JavaScript去除字符串左右的空格

摘要: //去掉左右空格 function String.prototype.Trim() { return this.replace(/(^\s*)|(\s*$)/g, ""); } //调用的时 str.Trim()就好了 阅读全文

posted @ 2011-09-18 13:54 东云180 阅读(113) 评论(0) 推荐(0) 编辑

导航