html>
替换多个字符/*
window.onload =
setInterval(function () {//这里是定时刷新,可以换倒计时,setTimeout
toRed($("#keyword").val(), "text");
}, 100);
function toRed(content, id) {
if (content == null || content == '') return true;
var bodyHtml = $("#" + id).html();
var keys = content.split(" ");
for (var i = 0; i
reger = new RegExp("(>|^)([^]*
bodyHtml = bodyHtml.replaceAll(keys[i], "" + keys[i] + "");
}
$("#" + id).html(bodyHtml);
$("#search")[0].focus();
}
RegExp.quote = function (str) {
return str.replace(reger, "$3");
};
String.prototype.replaceAll = function (s1, s2) {
var v = RegExp.quote(s1);
return this.replace(new RegExp(v, "gm"), s2);
}
/*]]>*/
变红奥
890
7890
6785612034567810234565612034567810234560