String.prototype.Trim=function()
    

        
return this.replace(/(^\s*)|(\s*$)/g,"");
    }
 

调用:

document.getElementById("keyword").value.Trim()==""


 

posted on 2007-09-12 12:22  jalor  阅读(609)  评论(0)    收藏  举报