62,612
社区成员
发帖
与我相关
我的任务
分享
function clear(str) {
str = str.replace(/,/g, "");//取消字符串中出现的所有逗号
return str;
}
<script>
String.prototype.replaceAll = function (AFindText,ARepText){
raRegExp = new RegExp(AFindText,"g");
return this.replace(raRegExp,ARepText);
}
alert("axxxbxxxxcxxxxx".replaceAll("x", "_"))
</script>