落雨

js String Trim函数

<javascript>

String.prototype.trim = function()

{

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

}

</javascript>

评论