1 ??//JQuery替换全部字符
<script>2 ?????String.prototype.replaceAll = function (targetStr, newStr) {3 ???????var sourceStr = this.valueOf();4 ???????while (sourceStr.indexOf(targetStr) !== -1) {5 ????????????sourceStr = sourceStr.replace(targetStr, newStr);6 ???????}7 ???????return sourceStr;8 ?????};9 ??</script>
JQuery替换全部字符
原文地址:https://www.cnblogs.com/xiaoyongjun/p/10184040.html