不兼容ie的trim

Posted on 2016-12-13 17:04  发飙的木鱼  阅读(43)  评论(0)    收藏  举报
  1. String.prototype.trim=function(){returnthis.replace(/(^\s*)|(\s*$)/g,"");}