摘要:
//去除中间空格 String.prototype.Trim = function(){ return this.replace(/(^\s*)|(\s*$)/g, ""); } //去除左侧空格 String.prototype.LTrim = function(){ return this.replace(/(^\s*)/g, ""); } //去除右侧空格 String.prototype.RTrim = function(){ return this.replace(/(\s*$)/g, ""); }使用:if(name.LT 阅读全文