<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,   "");  
  }  


function StringTrim()
{
document.all.txt_Res.value=document.all.txt_Ori.value.Trim();
}

function StringLTrim()
{
document.all.txt_Res.value=document.all.txt_Ori.value.LTrim();
}

function StringRTrim()
{
document.all.txt_Res.value=document.all.txt_Ori.value.RTrim();
}

</script>

<input type=text >

相关文章:

  • 2022-03-06
  • 2021-09-28
  • 2021-07-09
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-06
  • 2022-12-23
  • 2021-12-31
  • 2022-03-01
相关资源
相似解决方案