How do javascript-h5 pages interact with app apps (iOS, Android)?

Source: Internet
Author: User
I asked a similar question, but the respondents are Android, are there any iOS side?

Do an activity and embed a H5 page in the app.

How do I let the user click the button on the H5 page to jump to another page of the app?

For example, click on the H5 page of the recharge button, jump to the top-up interface (This page is the app's original), click the Snap button immediately, jump to the product page (this page is the app native).

How does the H5 interact with the app side of the data?

How to write in the background?

Is there an example?

Please take the weapon.

Another similar question

Reply content:

I asked a similar question, but the respondents are Android, are there any iOS side?

Do an activity and embed a H5 page in the app.

How do I let the user click the button on the H5 page to jump to another page of the app?

For example, click on the H5 page of the recharge button, jump to the top-up interface (This page is the app's original), click the Snap button immediately, jump to the product page (this page is the app native).

How does the H5 interact with the app side of the data?

How to write in the background?

Is there an example?

Please take the weapon.

Another similar question

Request the HTML5 page in the UIWebView control,
In - (void)webViewDidFinishLoad:(UIWebView *)webView this method calls with the stringByEvaluatingJavaScriptFromString:@"js代码" JS interaction, remove the HTML5 page button corresponding to the URL address, and then create another page to pass the value on the line.

Pseudo 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];}基本就这么个意思。。

URL schemes in iOS?

IOS please use https://github.com/marcuswest ...

Android please use Https://github.com/lzyzsd/JsB ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.