//高亮顯示搜索到的關鍵字
function HeightLight(Keyword)
{
//文本選擇器
var TextRange;
//是否找到
var Found=false;
//找到的次數
var Count =
TextRange = document
Found = TextRange
if (Found)
{
Count++;
}
while (Found && Count >
{
TextRange
//將滾動條定位到第一次查到的視口范圍內
if(Count==
{
TextRange
}
//繼續查找
Found = TextRange
if (!Found)
{
Count =
}
else
{
Count++;
}
}
}
//正則式法
function highLight(ele
{
var reg = new RegExp("(" + keys
ele
}
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19847.html