How to implement finding in UIWebView with next and Previous?
I have been stuck on I from a quite while. I have been searching for this from a lot of time. I had implemented Find and highlight the text using java script. For that I had referred http://hi.baidu.com/ncudlz/blog/item/826ede354694da1f90ef3900.html link.
This was helpful but what I actually needed is I want to implement Next and Previous button while searching for that when the java Script find the first occurrence my UIWebView should be scrolled to that position. On click on next button it should scroll to the next position and on previous if we click on previous button.
So how 开发者_运维问答can we scroll the WebView when we get the occurrence of text.
Thank you all in advance
You can use element.scrollIntoView();
method which scrolls the element into view.
精彩评论