标签:
如上图所见,读读日报为广告部分,我们不想看到,所以屏蔽掉。将url在浏览器打开,查看源码,找出广告部分的样式
执行代码:
-(void)webViewDidFinishLoad:(UIWebView *)webView{ [web stringByEvaluatingJavaScriptFromString:@"document.getElementsByClassName(‘dudu-head‘)[0].style.display = ‘NONE‘"]; [web stringByEvaluatingJavaScriptFromString:@"document.getElementsByClassName(‘bottom-download‘)[0].style.display = ‘NONE‘"]; }
标签:
原文地址:http://www.cnblogs.com/buakaw/p/5237011.html