ie 下对于 js 去掉字串的空格,无效 String.prototype.LTrim = function(){ return this.replace(/(^\s*)/g, ""); } this.LTrim(); 不可能吧 把你的代码贴出来