Get tag's and values from Jscript where pageScroll happen in UIWebView

梦想的初衷 提交于 2019-12-21 22:45:14

问题


In my app the XHTML file is loaded in the web view when web view is allocated.

if whatever file is loaded have 5000 lines of text in 200 Tag then only 10 Tag's value will see on first page ans when swipe on the screen the new page come and at that time other 10 or 12 Tag's value will come.

My question is how to get only that scrollable part of html from java script ?

i use below line to scroll the page

NSString* goTo =[NSString stringWithFormat:@"pageScroll(%f)", pageOffset];
[webView stringByEvaluatingJavaScriptFromString:goTo];

i used to get whole html with this line of code of java script

document.documentElement.innerHTML

but i need to get only that html tex or part or Tag's that are scrolled.

any hint, idea, code, link, tutorial will be great help...

来源:https://stackoverflow.com/questions/25480212/get-tags-and-values-from-jscript-where-pagescroll-happen-in-uiwebview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!