Home > Backend Development > PHP Tutorial > javascript - How does the H5 page interact with the APP application (iOS, Android)?

javascript - How does the H5 page interact with the APP application (iOS, Android)?

WBOY
Release: 2016-09-30 09:37:33
Original
1558 people have browsed it

I asked a similar question, but the answers were all for Android. Is there any one for iOS?

Create an activity and embed an H5 page in the app.

How to let users click the button on the H5 page to jump to another page of the APP?

For example, click the recharge button on the H5 page to jump to the recharge interface (this page is native to the APP), click the Buy Now button to jump to the product page (this page is native to the APP).

How do H5 and APP interact with data?

How to write the background?

Are there any examples?

Please give me some advice.

Another similar question

Reply content:

I asked a similar question, but the answers were all for Android. Is there any one for iOS?

Create an activity and embed an H5 page in the app.

How to let users click the button on the H5 page to jump to another page of the APP?

For example, click the recharge button on the H5 page to jump to the recharge interface (this page is native to the APP), click the Buy Now button to jump to the product page (this page is native to the APP).

How do H5 and APP interact with data?

How to write the background?

Are there any examples?

Please give me some advice.

Another similar question

Request the Html5 page in the UIwebView control,
In - (void)webViewDidFinishLoad:(UIWebView *)webView call stringByEvaluatingJavaScriptFromString:@"js code" in this method to interact with js and take out the url corresponding to the button in the Html5 page Address, and then create another page to pass the value. .

Pseudo code:

<code>另一页面:
Page2.h
@property (nonatomic,strong)NSString *url;

当前页面:
UIWebView *view=[UIwebView allco]init];
- (void)webViewDidFinishLoad:(UIWebView *)webView{
   NSString *str= [view stringByEvaluatingJavaScriptFromString:@"document.getElementById('')"];
    //另一个页面
    Page2 *p=[Page2 alloc]init];
    p.url=str;
    [self.navigationController pushViewController:p animated:YES];

}

基本就这么个意思。。</code>
Copy after login

URL schemes in iOS?

iOS Please use https://github.com/marcuswest...

Android Please use https://github.com/lzyzsd/JsB...

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template