在文本区域中突出显示搜索文本

3
我需要在文本区域中突出显示搜索词。
我有一个文本字段、搜索按钮和文本区域。
引用...
After i have enter the search string in the text field whenever i click the search button it highlight the search terms which is available in the text area and focus the search term in text area.

I have try to do this by using jquery.

But in mozilla,I can't get the focus to the search term at the time of search.

I have to scroll down the text area for find the focused search term.

In I.E. also it doesn't work properly. 

否则,如果与文本区域中的突出显示搜索词有关的任何帖子也值得赞赏。
请指导我如何实现这一点。

1
定义 'highlight'。你不能在文本区内真正地突出显示任何内容,你只能选择一个范围。 - jAndy
重复的http://stackoverflow.com/questions/2863641/highlight-changes/2863719#2863719 - James Westgate
1个回答

2

这些是仅限于IE和专有的,这限制了该解决方案仅在IE中工作。 - Tim Down

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接