87,904
社区成员
发帖
与我相关
我的任务
分享
String.prototype.replaceAll = function(s1, s2) {
return this.replace(new RegExp(s1, "gm"), s2); //g全局
}
alert("abcababssa".replaceAll('a', 'A'););
这样可以一次替换多个
$.post(url, null, callback, "html");
设置值的返回类型是html,这样应该是支持的。