清除两端空格

 function Trim()
    {
       document.getElementById("TextBox1").value=document.getElementById("TextBox1").value.replace(/(^\s*)|(\s*$)/g, "");
    } 

posted on 2008-05-15 16:38  leanco  阅读(104)  评论(0)    收藏  举报

导航