- 加载网页
//创建URL
NSURL *url = [[NSBundle mainBundle] URLForResource:@”abc.html” withExtension:nil];
//创建请求
NSURLRequest *request = [NSURLRequest requestWithURL:url];
//发送请求加载网页
[webView loadRequest:request];
- 执行javascript(需要网页加载完毕才能执行)
[webView stringByEvaluatingJavaScriptFromString:js];
- 监听webView的加载
设置代理监听:webView.delegate = self;