如何让“返回"按钮在远程和本地jQuery Mobile页面之间工作? [英] How to get Back button working between remote and local jQuery Mobile pages?

查看:113
本文介绍了如何让“返回"按钮在远程和本地jQuery Mobile页面之间工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个本地jQuery Mobile项目(在PhoneGap内部,因此为file://协议),在这里我有时需要从服务器中获取外部页面(使用http://),其中内容也都是具有几乎相同的jQM页面标记(内容(由CMS生成)除外.

I have a local jQuery Mobile project going (inside PhoneGap, thus file:// protocol) where I sometimes need to fetch external pages (using http://) from a server where the content too are jQM pages with almost identical markup (except for the content, which is generated from a CMS).

将$ .mobile.allowCrossDomainPages设置为true可以给我页面,就可以了.但是,返回失败.我被卡在服务器上找不到/www/index.html的地方(当然是doh.).有没有一种方法可以记住"我的来源,将我带回到我最初来自的本地html页面?

Setting $.mobile.allowCrossDomainPages to true gives me the page, and that is all right. Going Back, however, fails. I get stuck in a place where /www/index.html is not found on the server (like, doh, of course..). Is there a way to "remember" where I came from, taking me back to the local html page I originally came from?

推荐答案

我们刚刚在RC3的jQuery Mobile的PhoneGap上添加了一个文档页面,该页面将为您提供很多帮助: http://jquerymobile.com/test/docs/pages/phonegap.html

We just added a docs page on PhoneGap in jQuery Mobile for RC3 that should help you out quite a bit: http://jquerymobile.com/test/docs/pages/phonegap.html

这篇关于如何让“返回"按钮在远程和本地jQuery Mobile页面之间工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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