<body onload="replaceKeyword('websiteContent')">
你要把 websiteContent 改成你要取代的元素(某個table 或 td 或 div) 的 ID
或者整個 body 都要取代的話,用:
<body onload="replaceKeyword()">
大小寫不拘的話,改:
var re = new RegExp(keywords[i][0].replace(/\s+/, "\\s+"), "g");
new RegExp(m[j], "g");
為:
var re = new RegExp(keywords[i][0].replace(/\s+/, "\\s+"), "i");
new RegExp(m[j], "i");
即可
|