我想在 UIWebView 中加载 .js(javaScript) 文件,而不仅仅是一个函数
[webView stringByEvaluatingJavaScriptFromString:@""];
我想在 UIWebView 中加载 .js(javaScript) 文件,而不仅仅是一个函数
[webView stringByEvaluatingJavaScriptFromString:@""];
NSString *javaScript=[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"javascript" ofType:@"js"] encoding:NSUTF8StringEncoding error:nil];
[webView stringByEvaluatingJavaScriptFromString:javaScript];
[2] http://iphoneincubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview