- 博客(1)
- 收藏
- 关注
原创 replaceAll 兼容 IE
if (typeof ''.replaceAll != 'function') { console.log('[不兼容]replaceAll') String.prototype.replaceAll = function (oldStr, newStr) { return this.replace(new RegExp(oldStr, 'g'), newStr); } } console.log('[不兼容]replaceAll'.replaceAll('不兼容', '兼容处理'));
2021-10-18 16:57:15
276
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人