删除前后空格

//删除前后空格  
  function   String.prototype.trim(){  
  return   this.replace(/(^\s+)|(\s+$)/g,"");  
  }  
posted @ 2008-12-03 12:56  南守拥  阅读(224)  评论(0编辑  收藏  举报