在phonegap的两个html页面之间传递数据 [英] Passing data between two html pages in phonegap

查看:127
本文介绍了在phonegap的两个html页面之间传递数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用phonegap创建移动应用。
我不想在一个html页面中有一切,所以我创建了几个。每个都有.js文件附加。如何在这些html页面之间发送数据?

I'm using phonegap to create mobile app. I don't want to have everything in one html page so I created few of them. Each one has .js file attached. How can I send data between these html pages?

推荐答案

最方便和最简单的方法是使用< =http://docs.phonegap.com/en/1.4.1/phonegap_storage_storage.md.html#localStorage> localStorage 。 Android中有一个错误,用于在网址中传递参数,因此我不建议使用该方法。

The most portable and simplest way to do it is to use localStorage. There is a bug in Android for passing parameters along in the URL so I don't recommend using that method.

这篇关于在phonegap的两个html页面之间传递数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆