[英]Highlight search text in textarea
我必須在文本區域中突出顯示搜索詞。
我有一個文本歸檔,搜索按鈕和文本區域。
引用...
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.
否則,如果任何與文本區域中的突出顯示搜索詞相關的帖子也是可感知的。
請指導我實現這一目標。
在Internet Explorer上,我將TextRange對象與boundingTop屬性值結合使用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.