Ich lade Jquery UI Autoload, Remote-Jsonp.html suchen. Dies ist Ajax-Funktion, aber ich öffne Konsole .. ich keine Anfrage in meiner Konsole sehen ...Unterschied zwischen dataType Jsonp und JSON
Was ist der Unterschied zwischen datatype, „JSONP“ und datatype; „JSON“
$("#city").autocomplete({
source: function(request, response) {
$.ajax({
url: "http://ws.geonames.org/searchJSON",
dataType: "jsonp",
data: {
featureClass: "P",
style: "full",
maxRows: 12,
name_startsWith: request.term
},
success: function(data) {
response($.map(data.geonames, function(item) {
return {
label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
value: item.name
}
}));
}
});
},
Referenzhttp://jqueryui.com/demos/autocomplete/remote-jsonp.html
'cross-browser' oder' cross-domain'? : s –
@Joy Definitiv domänenübergreifend. –
@Joy danke an beide – thecodeparadox