//高亮顯示搜尋到的關鍵字
function Height (Keyword)
{
//文字選擇器
var TextRange;
//找到
var Found=false;
//找到的次數
0;
TextRange = document.body.createTextRange();
Found = TextRange.findText(Keyword);
if (Found)
while (Found && Count > 0)
{
TextRange.pasteHTML('
' Keyword '');
//將捲軸定位到 Keyword '');
//將捲軸定位到第一次查到的視窗範圍內
if(Count==1)
{
TextRange.scrollIntoView();
}
.findText(Keyword);
if (!Found)
{
Count = 0;
}
else
o>
}
//正規式法
function highLight(ele,keys)
{
var reg = new RegExp("(" keys.replace(/,/,"|") ")","g");
ele.innerHTML = ele.innerHTML.replace(reg,"$1");
}