Reading HTML content from a UIWebView

前端 未结 10 2559
感动是毒
感动是毒 2020-11-22 13:47

Is it possible to read the raw HTML content of a web page that has been loaded into a UIWebView?

If not, is there another way to pull raw HTML content f

10条回答
  •  迷失自我
    2020-11-22 14:37

    To get the whole HTML raw data (with and ):

    NSString *html = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.outerHTML"];
    

提交回复
热议问题