第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

具有jsonp內(nèi)容類型的jQuery.ajax請求后發(fā)生parsererror

具有jsonp內(nèi)容類型的jQuery.ajax請求后發(fā)生parsererror

慕田峪4524236 2019-10-30 12:44:10
我正在使用jQuery 1.5.1版執(zhí)行以下ajax調(diào)用:$.ajax({    dataType: 'jsonp',    data: { api_key : apiKey },    url: "http://de.dawanda.com/api/v1/" + resource + ".json",    success: function(data) { console.log(data); },    error: function(jqXHR, textStatus, errorThrown) { console.log(errorThrown); console.log(textStatus); }});服務器使用有效的json對象響應:{  "response": {    "type":"category",    "entries":1,    "params":{      "format":"json",      "api_key":"c9f11509529b219766a3d301d9c988ae9f6f67fb",      "id":"406",      "callback":"jQuery15109935275333671539_1300495251986",      "_":"1300495252693"    },    "pages":1,    "result":{      "category":{        "product_count":0,        "id":406,        "restful_path":"/categories/406",        "parent_id":null,        "name":"Oberteile"       }     }   } }但是從不調(diào)用成功回調(diào),而是由錯誤回調(diào)產(chǎn)生以下輸出:jQuery15109935275333671539_1300495251986 was not calledparsererror為什么會這樣?我沒有使用jQuery的其他庫。編輯:如果我嘗試使用“ json”作為dataType而不是“ jsonp”來進行ajax調(diào)用,則服務器將以空字符串作為響應。
查看完整描述

3 回答

  • 3 回答
  • 0 關(guān)注
  • 1101 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號