//接收web事件

-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{

if ([request.mainDocumentURL.relativePath isEqualToString:@"点击事件名"]) {

return false;  //执行本地代码,返回false不让网页读取网络资源

}

return true;   //为yes加载内容,否则不

}

04-16 16:35