我一直在搜索arround,我無法從這個例子中檢索JSON信息。有人可以幫我嗎?JSON調用失敗,JQuery
var jsonURL = "http://mdc2.cbuc.cat/dmwebservices/index.php?q=dmGetCollectionList/json";
var jqxhr = $.getJSON(jsonURL, function(data) {
alert("Success!");
alert(data[0].alias);
})
.success(function() { alert("second success"); })
.error(function() { alert("error"); })
.complete(function() { alert("complete"); });
jqxhr.complete(function(){ alert("second complete"); });
我檢查的網址,到處它說是有效的,以及格式化......
只有當它是JSONP時,才能從其他域中檢索JSON。 –