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

Im new to Html language and I am trying to develop a PhoneGap App with it, I want to have 4 options in

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");

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744376565a4571214.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信