How-to store variable beetween jQM pages?

后端 未结 4 1454
忘掉有多难
忘掉有多难 2020-12-11 10:40

How do I pass a variable like username between two jQueryMobile pages?

or two regular pages for that matter, having the variable as global does not work, since at th

4条回答
  •  时光说笑
    2020-12-11 11:02

    You can use either the URL through a query string or client side routing, you can use localStorage (assuming they are on the same domain), or you can use cookies.

    If you decide to use client side routing there is a plug in specifically for JQM that ties in with the different JQM page events

    https://github.com/azicchetti/jquerymobile-router

提交回复
热议问题