去除空格

String.prototype.Trim = function () {
return this.replace(/(^s*)|(s*$)/g, "");
}

原文地址:https://www.cnblogs.com/angelgril/p/4171026.html