js常用自定义公共函数汇总 复制代码 代码如下: String prototype trim = function(){ return this replace( (^ s*)|( s*$) g, ""); JavaScript 2022-04-26 307 点赞 4 评论 465 浏览