gpt4 book ai didi

javascript - 错误 : : jQuery was not called

转载 作者:可可西里 更新时间:2023-11-01 01:32:17 25 4
gpt4 key购买 nike

这是我的 ajax 调用。

 $.ajax({
type: "GET",
url: "http://example.com/v1/search?keyword=r",
dataType: "jsonp",
crossDomain: true,
success: function (responseString) {
alert(responseString);
},
error: function (xhr, errorType, exception) {
var errorMessage = exception || xhr.statusText;
alert(errorMessage);
}
});

来 self 的示例 url 的响应

    {
"response": [{
"attributes": {
"type": "enge",
"url": "/services/data/v24.0/sobjects/Challenge__c/a0GZ0000005Vvh4MAC"
},
"name": "Really",
"end_date": "2013-02-07T15:26:00.000+0000",
"total": 350.0,
"registered_members": 0.0,
"id": "30",
"type": "Design",
"id": "a0GZ0000005Vvh4MAC",
"start_date": "2012-11-19T16:52:00.000+0000",
"description": "This is my really cool challenge",
"remaining_days": 28.0,
"categories__r": [{
"attributes": {
"type": "Category__c",
"url": "/services/data/Category__c/a08Z0000000RNI2IAO"
},
"id": "0RNI2IAO",
"display_name": "Andy"
}, {
"attributes": {
"type": "Category__c",
"url": "/services/Category__c/a08Z0000000RNI3IAO"
},
"id": "a0O",
"display_name": "ADR"
}]
}

}],
"count": 1
}

我正在尝试进行跨域调用并出现错误

jQuery180014405992737595236_1357861668479 was not called

更新

好吧,我尝试使用 dataType:"json"但此时出现错误

No Transport

最佳答案

这表明网络错误或端点未返回 JSONP 响应。

(我猜我在测试时遇到的 DNS 查找失败是因为那不是您的真实 URL(请使用 example.com 作为示例 URL,这就是它的用途) 如果不是,那是你的问题)。

关于javascript - 错误 : : jQuery was not called,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14255502/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com