我有一个使用jquery mobile和phonegap构建的windows phone 8应用程序示例,当我在浏览器上运行该应用程序时,它没有问题。 问题是,当我从模拟器或设备运行应用程序时,它无法进行ajax webservice调用,我可以知道他们应该启用从模拟器或设备访问webservice调用的任何设置
示例代码:
$.ajax({
type: "POST",
url: URL + "Sample.aspx",
contentType: "application/json; charset=utf-8",
dataType: "json",
isLocal: true,
success: function (all) {
alert("hi2");
store.set('sampleData', data);
},
failure: function () {
alert("failure");
}
});