【发布时间】:2012-05-04 18:32:24
【问题描述】:
如标题所示:PhoneGap / jQuery Mobile 应用程序在 webview 模式下是否允许“POST”跨域 ajax 请求?前提是 $.mobile.allowCrossDomainPages 和 $.support.cors 都设置为 true。
【问题讨论】:
标签: ajax jquery-mobile cordova webview
如标题所示:PhoneGap / jQuery Mobile 应用程序在 webview 模式下是否允许“POST”跨域 ajax 请求?前提是 $.mobile.allowCrossDomainPages 和 $.support.cors 都设置为 true。
【问题讨论】:
标签: ajax jquery-mobile cordova webview
这两个你都不需要。
如果您在 iOS 中,只需添加一个新的外部主机并将其值设置为 *
如果您使用的是 Android,请将其添加到您的清单中
<access origin="https://example.com" subdomains="true" />
这是关于同一主题的另一篇文章 - What is the state of whitelisting in phonegap 1.3.0?
【讨论】:
jQuery.support.cors = true;
也试试这个
【讨论】: