그누보드5 에 Daum 우편번호 찾기 API 연동 하기
관련파일 : skin/member/basic/register_form.skin.php
<a href="<?php echo G5_BBS_URL ?>/zip.php?frm_name=fregisterform&frm_zip1=mb_zip1&frm_zip2=mb_zip2&frm_addr1=mb_addr1&frm_addr2=mb_addr2&frm_addr3=mb_addr3&frm_jibeon=mb_addr_jibeon" id="reg_zip_find" class="btn_frmline win_zip_find" target="_blank">주소 검색</a><br>
를
<a href="javascript:openDaumPostcode();" id="reg_zip_find" class="btn_frmline">주소 검색</a><br>
로 변경.
이때 a 태그에 들어있던 win_zip_find 클래스를 삭제하는것이 포인트 입니다.
삭제를 안하면 기존 win_zip_find click 이벤트와 충돌이 납니다.
그리고 맨 하단에 아래 자바스크립트 코드를 추가합니다.
<script src="http://dmaps.daum.net/map_js_init/postcode.js"></script>
<script type="text/javascript">
<!--
function openDaumPostcode() {
new daum.Postcode({
oncomplete: function(data) {
document.getElementById('reg_mb_zip1').value = data.postcode1;
document.getElementById('reg_mb_zip2').value = data.postcode2;
document.getElementById('reg_mb_addr1').value = data.address;
document.getElementById('reg_mb_addr2').focus();
document.getElementById('reg_mb_addr3').value = data.addressEnglish;
}
}).open();
}
//-->
</script>
모바일은 아래 링크를 참조하세요.
댓글 1개
VeritasLuxMea
11년 전
감사합니다 !
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 6077 | 9년 전 | 155 | ||
| 6076 |
PlayPixel
|
9년 전 | 145 | |
| 6075 | 9년 전 | 162 | ||
| 6074 | 9년 전 | 218 | ||
| 6073 |
|
9년 전 | 180 | |
| 6072 |
|
9년 전 | 322 | |
| 6071 | 9년 전 | 224 | ||
| 6070 |
|
9년 전 | 260 | |
| 6069 | 9년 전 | 235 | ||
| 6068 |
|
9년 전 | 185 | |
| 6067 | 9년 전 | 199 | ||
| 6066 |
|
9년 전 | 314 | |
| 6065 |
PASKRAN
|
9년 전 | 206 | |
| 6064 | 9년 전 | 231 | ||
| 6063 |
kiplayer
|
9년 전 | 339 | |
| 6062 |
|
9년 전 | 271 | |
| 6061 | 9년 전 | 211 | ||
| 6060 |
|
9년 전 | 267 | |
| 6059 |
|
9년 전 | 209 | |
| 6058 |
|
9년 전 | 203 | |
| 6057 | 9년 전 | 253 | ||
| 6056 |
|
9년 전 | 205 | |
| 6055 |
|
9년 전 | 250 | |
| 6054 |
|
9년 전 | 228 | |
| 6053 |
snshero
|
9년 전 | 573 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기