javascript中去掉字符串的前后多余空格 String.prototype.trim = function() { return this.replace(/^\s\s*/,'').replace(/\s\s*$/,'');} javascript 2023-09-07 57 点赞 0 评论 86 浏览