解决trim兼容性

String.prototype.trim = function() {
 return this.replace(/^\s*/g, "").replace(/\s*$/g, "");
};

posted @ 2013-05-18 17:07  qiuhua  阅读(165)  评论(0编辑  收藏  举报