摘要:js 去掉空格function String.prototype.Trim() { return this.replace(/(^\s*)|(\s*$)/g, ""); } function String.prototype.Ltrim() { return this.replace(/(^\s*)/g, ""); }function String.prototype.Rtrim() { return this.replace(/(\s*$)/g, ""); } var str = " hi! "; var lef
阅读全文
posted @ 2008-09-27 10:56