开发者

How to update html file from native app using Phone gap in IOS

开发者 https://www.devze.com 2023-02-03 08:13 出处:网络
Im doing a project with PhoneGap. 1.The first view wi开发者_如何学Pythonll be webView using Phonegap.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消