self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight)];
self.webView.delegate=self;
[self.view addSubview:self.webView];
NSURL *url = [NSURL URLWithString:@"http://ssel/index.html"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:request];
在web view加载完成后执行
getUserModelCallback是内部函数
strJson json字符串参数
[self.webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"getUserModelCallback(%@)",strJson]];
网友评论