JavaScript 字符串的操作

1. 在指定位置,插入字符串(此需求来源于,img中src没值的字符串标签中,插入图片http地址) // 使用slice写出的 自定义方法,绑定在String的原型链上 String.prototype.splice = function(start, newStr) { return this.
posted @ 2020-07-29 18:02  tengyuxin  阅读(160)  评论(0编辑  收藏  举报