📜  ajax comet - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:05.240000             🧑  作者: Mango

代码示例1
var url = 'http://www.geonames.org/postalCodeLookupJSON?postalcode=' 
    + $('#postalCode').val() + '&country=' 
    + $('#country').val() + '&callback=?'; 
$.getJSON(url, function(data) { 
    $('#placeName').val(data.postalcodes[0].placeName); 
});