从不同的域加载jQuery Mobile的页面? [英] Load jQuery Mobile page from different domain?

查看:106
本文介绍了从不同的域加载jQuery Mobile的页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从外部网页加载一个jQuery支持AJAX页面?我正在用的PhoneGap的应用程序,我需要一个页面进行在线托管,因为它会不断更新,但我似乎无法弄清楚如何!我尝试了连接,但没有工作!任何想法?

Is there a way to load a jQuery AJAX Enabled page from a external page? I'm making an app with phonegap and I need one page to be hosted online because it is going to be continually updated, but I cant seem to figure out how! I tried just linking it, but that didn't work! Any ideas?

推荐答案

既然你正在使用的PhoneGap您可以设置白名单来解决跨域-政策。你必须明确保持这个白名单为每个目标平台。

Since you are working with PhoneGap you can set up a whitelist to work around the Cross-Origin-Policy. You have to maintain this whitelist specifically for each of your target platforms.

看看这个指南(PhoneGap的1.9+): http://docs.phonegap.com/en/1.9.0/guide_whitelist_index .md.html

Check out this Guide (PhoneGap 1.9+): http://docs.phonegap.com/en/1.9.0/guide_whitelist_index.md.html

如果你是PhoneGap的一个老版本,你必须注意一些不一致的地方之间就不同平台的白名单条目语法。

If you are on an older version of PhoneGap you have to pay attention to some inconsistencies regarding the white-list entry syntax amongst different platforms.

如果您使用的是jQueryMobile,也看看这个PhoneGap的具体建议: http://jquerymobile.com/test/docs/pages/phonegap.html

If you are using jQueryMobile, also check out this PhoneGap specific advices: http://jquerymobile.com/test/docs/pages/phonegap.html

这篇关于从不同的域加载jQuery Mobile的页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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