window.onload = function () {
var replaceMsg = "wHENEVER SANG MY SONG,oN THIS STAGE<BR /> ©1999-2006";
var matchExp = /([\d])|([a-z])|([A-Z])/g;
document.body.innerHTML = replaceMsg.replace(matchExp, magicCode);
}
function magicCode(s, a, b, c) {
return a ? "<font color='red'>" + s + "</font>" : (b ? b.toUpperCase() : c.toLowerCase());
}
麻烦大侠给我解释下这段正则式什么意思啊。
相关分类