String.prototype.trim = function() {
return this.replace(/^\s*/g, "").replace(/\s*$/g, "");
};
转载于:https://www.cnblogs.com/qiuh/archive/2013/05/18/3085674.html
String.prototype.trim = function() {
return this.replace(/^\s*/g, "").replace(/\s*$/g, "");
};
转载于:https://www.cnblogs.com/qiuh/archive/2013/05/18/3085674.html