Javascript去掉字符串前后空格

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

posted on 2008-03-24 15:54  老枪  阅读(1686)  评论(0编辑  收藏  举报

导航