<script>

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

</script>
posted on 2009-01-07 15:12  李辉明  阅读(444)  评论(0编辑  收藏  举报