JavaScript 字符串函数扩充

/*
******************************************
             字符串函数扩充  (StringEx.js)                              
******************************************
*/

//移除两边空白
String.prototype.Trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

posted @ 2009-01-13 16:16  强悍的抽屉  阅读(410)  评论(0编辑  收藏  举报