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