String.prototype.repeat = function(n) { return new Array(n+1).join(this); } // 替換全部 String.prototype.replaceAll = function(str1, str2) { return this.replace(new RegExp(str1, "gm"), str2); } // 清除空格 String.prototype.trim = function() { return this.replace(/^\s*(.*?
www.dbjr.com.cn/article/943...htm 2025-6-8