How to update html file from native app using Phone gap in IOS
Im doing a project with PhoneGap. 1.The first view wi开发者_如何学Pythonll be webView using Phonegap. 2.the links in the webview should redirect to native App
My request is: When the native app is used, the updates should be loaded in the WebView. Can any one tell me how to do it from native app updating webview.
You can execute javascript that will update the HTML loaded in the webview, check out
- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script
in UIWebView, here you can inject javascript that will update your html.
[webView stringByEvaluatingJavaScriptFromString:@"alert('JS Alert')"];
would show a normal alert dialog.
精彩评论