String.prototype.replaceAll = function (targetStr, newStr) {
  var sourceStr = this.valueOf();
  while (sourceStr.indexOf(targetStr) !== -1) {
    sourceStr = sourceStr.replace(targetStr, newStr);
  }
  return sourceStr;
};

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
  • 2021-09-28
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-16
  • 2021-08-08
  • 2021-09-16
  • 2021-11-25
  • 2022-12-23
  • 2021-06-05
相关资源
相似解决方案