Pass parameters based on a single page template http through a road post and get request. In multi-page templates, and without the need for server communication, there are typically three ways to implement parameter passing between pages in a multi-page template.
1. Get Road: The previous page generates parameters and passes to the next page, and then the get content is parsed on the next page.
2, through the HTML5 Web Storage to pass the parameter.
3. Create the current page variable. In the previous page, assign the required parameters to the variable. In the latter page, take the parameters from the variables. (Weak program flexibility)
First, a get way to achieve the inter-page parameter transfer
<! DOCTYPE html>watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvzgf3yw5nyw5iyw4=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast "/>
Note: To indicate the form of an access page as an external link form rel= "external", otherwise the inter-page parameter transfer does not work.
Second, through the HTML5 Web storage feature to achieve the parameters of the transfer
Usually consists of two parts, Sessionstorage is store content in the form of a session stored in the browser, because it is session-level storage. When the browser is closed. All the content in the sessionstorage disappears. Localstorage is persistent-based storage, similar to the use of cookies in traditional HTML development, and will not be deleted unless the content in the Localstorage is actively deleted.
Check browser support Web Storage features:
<! DOCTYPE html>
Usually. When we implement the inter-page parameter transfer in jquery Mobile, we do not use the localstorage instead of the sessionstorage because it does not have to be persisted locally.
<! DOCTYPE html>
Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.
Shang HTML5 Mobile Phone development path (in)--jquerymobile parameter passing between pages