我正在尝试使用 Intel XDK 构建 HTML5 移动应用程序。出于某种原因,当我在 Intel XDK 上进行仿真时,它可以工作,但是当我在真实设备上尝试时,我收到错误警报
http://localhost
发生以下错误:{"readyState":0,"responseText":"","status":0,"statusText":"error"}
request = $.ajax({
url: "http://domain.com/form.php",
type: "post",
data: serializedData
});
// callback handler that will be called on success
request.done(function (response, textStatus, jqXHR){
//do stuff
});
// callback handler that will be called on failure
request.fail(function (jqXHR, textStatus, errorThrown){
// log the error to the console
alert(
"The following error occured: "+
JSON.stringify(jqXHR,textStatus,errorThrown)
);
});