일본 주소 api callback 테스트
This commit is contained in:
@@ -24,29 +24,22 @@
|
||||
});
|
||||
|
||||
const fn_select_postcodeJp = function () {
|
||||
console.log();
|
||||
$.ajax({
|
||||
url: 'https://zipcloud.ibsnet.co.jp/api/search?zipcode='+$('#zip').val(),
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
url: 'https://zipcloud.ibsnet.co.jp/api/search?zipcode='+$('#zip').val()+'&callback=testcall',
|
||||
dataType: 'jsonp',
|
||||
success: function (Data) {
|
||||
console.log(Data);
|
||||
|
||||
let result = Data.results;
|
||||
console.log(result);
|
||||
console.log(result[0]);
|
||||
|
||||
if (res.status === 200 && res.results && res.results.length > 0) {
|
||||
console.log("addresss1 : "+res.results[0].address1);
|
||||
console.log("addresss2 : "+res.results[0].address2);
|
||||
console.log("addresss3 : "+res.results[0].address3);
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error('API 호출 실패:', error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const testcall = function () {
|
||||
console.log("hello");
|
||||
}
|
||||
</script>
|
||||
<div id="dlvylcRegist" class="modal default" style="max-width: 600px;">
|
||||
<form id = "dlvylcRegistForm">
|
||||
|
||||
Reference in New Issue
Block a user