Get tag's and values from Jscript where pageSc

2019-04-15 16:43发布

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...

0条回答
登录 后发表回答