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