/**
* 页面加载完成之后调用
*
* @param webView 实现该代理的webview
*/
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
[webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByClassName('bottomdl')[0].style.display='none'"];
[webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('icon_0').style.display='none'"];
}
本文介绍如何使用 iOS 中的 UIWebView 加载完成后通过 JavaScript 隐藏特定元素的方法。具体包括两个 JavaScript 代码片段:一是隐藏类名为 'bottomdl' 的元素;二是隐藏 id 为 'icon_0' 的元素。
4105

被折叠的 条评论
为什么被折叠?



