最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Pass a string value from one html to another (Phonegap) - Stack Overflow

programmeradmin3浏览0评论

Im new to Html language and I am trying to develop a PhoneGap App with it, I want to have 4 options in my main menu(index), and depending on what option the user taps load specific data from an xml. In order to load that specific data, I need to save a string that distinguish the option choose by the user and helps me find data in the xml.

How can I do this? I also heard something about some memory PhoneGap provides for this cases, couldn't find anything though, Thanks!

Im new to Html language and I am trying to develop a PhoneGap App with it, I want to have 4 options in my main menu(index), and depending on what option the user taps load specific data from an xml. In order to load that specific data, I need to save a string that distinguish the option choose by the user and helps me find data in the xml.

How can I do this? I also heard something about some memory PhoneGap provides for this cases, couldn't find anything though, Thanks!

Share Improve this question asked Feb 1, 2013 at 9:51 Golan_trevizeGolan_trevize 2,4335 gold badges23 silver badges22 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

we pass values from one page to another with localStorage

/* Page A */
window.localStorage.setItem("id", "stringValue");

/* Page B */
var stringValue = window.localStorage.getItem("id");
发布评论

评论列表(0)

  1. 暂无评论