从UIWebView访问元数据 [英] Access Meta Data from UIWebView
本文介绍了从UIWebView访问元数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何访问加载到iOS中的UIWebView的HTML页面的元数据?
How to access Meta Data of a HTML page loaded into a UIWebView in iOS?
推荐答案
您可以访问元标记的content by,
You can access the meta tag's content by,
NSString *graphURL = [webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('facebook_share')
[0].getAttribute('content')"];
您可以在其中更改'content'中声明的属性名称
where you can change the attribute name declared in 'content'
这篇关于从UIWebView访问元数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文