Quantcast
Channel: CSDN博客移动开发推荐文章
Viewing all articles
Browse latest Browse all 5930

获取当前页面的title

$
0
0
      self.title= [webView stringByEvaluatingJavaScriptFromString:@"document.title"];//获取当前页面的title
self.currentURL = webView.request.URL.absoluteString;  

    NSLog(@"title-%@--url-%@--",self.title,self.currentURL);  



   NSString *lJs = @"document.documentElement.innerHTML";//获取当前网页的html  

   self.currentHTML = [webView stringByEvaluatingJavaScriptFromString:lJs]; 
作者:u011018979 发表于2017/9/7 11:32:01 原文链接
阅读:6 评论:0 查看评论

Viewing all articles
Browse latest Browse all 5930

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>