- (void)webViewDidFinishLoad:(UIWebView *)webView //网页加载完成的时候调用
{
CGFloat height = [[_web stringByEvaluatingJavaScriptFromString:@"document.body.scrollHeight"]floatValue];
}
底下这种也可以(个人觉得上面的更好)
CGSize fittingSize = [webView sizeThatFits:CGSizeZero]; NSLog(@"网页高度------:%f",fittingSize.height);