아래 코드로 다음 JSON에 액세스 할 수없는 문제가 있습니다. 내 네트워크 뷰어에서 JSON을 볼 수 있지만 오류는 없지만 apiReturn 함수에서 아무것도 실행되지 않아 그 이유를 알 수 없습니다.JSON 데이터에 액세스 할 수 없습니다.
/**/
({
"batchcomplete": "",
"query": {
"normalized": [{
"from": "mouse",
"to": "Mouse"
}],
"pages": {
"18845": {
"pageid": 18845,
"ns": 0,
"title": "Mouse",
"extract": "<p>A <b>mouse</b> (plural: <b>mice</b>) is a small rodent characteristically having a pointed snout, small rounded ears, a body-length scaly tail and a high breeding rate. The best known mouse species is the common house mouse (<i>Mus musculus</i>). It is also a popular pet.</p>"
}
}
}
})
$.getJSON("https://en.wikipedia.org/w/api.php?action=query&origin=*&format=json&exsentences=3&prop=extracts&titles=Main+Page&callback=&titles=mouse", function(apiReturn){
var valueText = apiReturn.query.pages[18845].extract;
console.log(valueText);
});
* (.?. 한숨'' "변경 ..."문장에서, 새로 고침 공격이 표시되지 않는 경우) * –