如何让页面里的某些关键字高亮显示

haha1980215 2005-01-07 10:10:11
如何让页面里的某些关键字高亮显示,包括链接中的关键字。
...全文
204 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ttyp 2005-01-07
  • 打赏
  • 举报
回复
try

NavigateAndFind Method Internet Development Index

--------------------------------------------------------------------------------

Navigates to the specified URL and selects the specified text.

Syntax

external.NavigateAndFind(sLocation, sQuery, sTargetFrame)
Parameters

sLocation Required. String that specifies the URL of a Web page.
sQuery Required. String that specifies the text to highlight on the Web page specified by sLocation .
sTargetFrame Required. String that specifies the name of the target frame to query.

Return Value

No return value.

Remarks

This method requires a full qualified path, including a location prefix (http://, c:\, and so on).

The target frame argument might be empty.

This method is not supported in Introduction to HTML Applications (HTAs).

Example

This example uses the NavigateAndFind method to search for a word or phrase on another page.

HideExample

<HEAD>
<SCRIPT>
function fnNAF(){
window.external.NavigateAndFind(
"http://www.domain.ext/path/file.htm",
oSearchText.options[oSearchText.selectedIndex].text,"");
}
</SCRIPT>
</HEAD>
<BODY>
<SELECT id=oSearchText onchange="fnNAF()">
<OPTION>Persnickety
<OPTION>Seattle rain
<OPTION;> ...
</SELECT>
</BODY>
haha1980215 2005-01-07
  • 打赏
  • 举报
回复
是的,自己做的检索,想在显示的时候把结果高亮显示
梅雪香 2005-01-07
  • 打赏
  • 举报
回复
是不是在搜索的时候

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧