问题
I'm facing very strange issue. I'm using below code to get value from an API:
var getId = function () {
var url: "Proxy:url=https_URL"
var result;
$.ajax({
type: 'GET',
url: url,
dataType: 'json',
contentType: "application/json",
success: function (res) {
objLen = res.length;
var arrElems = [];
for (i = 0; i < objLen; i++) {
arrElems[i] = res[i].ids;
}
result = arrElems;
},
error: function (e) {
result = e;
}
})
return result;
}
Its responsing as success but when I run this code on Safari its giving an error. Can anyone please help me to find what is the issue and to solve it?
来源:https://stackoverflow.com/questions/14996110/getting-error-in-ajax-response-on-safari-browser-only