The problem of nesting H5 pages in iOS has been blank

Source: Internet
Author: User
Tags blank page
Problem description

The following business scenarios, in iOS applications, embed the H5 page, call him a page, click a page to jump to b page, b page has a button, call him button S, button s will trigger an AJAX event, to request an application interface, return an HTML, the return of HTML is defined as h variable name bar, Ajax invocation ("Body"). html (h); H is the content of a form, which is set ("Body"). html (h); H is the content of a form, after setting ("Body"). HTML (h), The Submit method of the form in H is invoked, assuming that the ID of the form in H is Fid,js execution $ ("#fid"). Submit (), and then jump to the action address specified by form, OK, so now, on iOS devices, I clicked, The return button for the native app, not the Back button for the page (there are two back buttons on the screen), then there will be a blank page in iOS, not in the Android device. 

Problem Lookup

Later looking for iOS development, all kinds of look, can not find the reason, is brutal, a development sister later looked at the code, explained: In the call ("Body"). HTML (h), will empty the entire page, the page will have a blank period, wait until the Ajax return data, then set into the HTML , the HTML already jumps to the new page requested in form and clicks on the Back button of the iOS native view to see

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.