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, ""); } 相关文章: