博客>
iOS-WebView常规使用
iOS-WebView常规使用
ios
版权声明:本文为博主原创文章,未经博主授权不得转载。
1.获取网页高度 NSString *strHeight =[webView stringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight"];
[webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('body')[0].style.background='#FFFFFF'"];
_webView.frame = CGRectMake(20, 10, G_SCREEN_WIDTH-40, [strHeight floatValue]);
_fheight = [strHeight floatValue]+10;
收藏