小编use*_*763的帖子

Why is jQuery Ajax not working in Cordova iOS app

I am building a Cordova app that uses jQuery Ajax to upload images to our server. The uploads were working for a while on both Android and iOS, then after a while they suddenly stopped working on iOS. Now, after a few seconds of trying to access a website, the request fails and I get an error message, which isn't much help. The error is like the following:

readyState: 0
status: 0
statusText: "error"
Run Code Online (Sandbox Code Playgroud)

My code is:

    $.ajax("http://testapi.com/api", {
        data: …
Run Code Online (Sandbox Code Playgroud)

ajax jquery ios cordova

4
推荐指数
1
解决办法
5110
查看次数

标签 统计

ajax ×1

cordova ×1

ios ×1

jquery ×1