그누보드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에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5552 |
잘살아보자
|
11년 전 | 2653 | |
| 5551 |
잘살아보자
|
11년 전 | 2229 | |
| 5550 |
잘살아보자
|
11년 전 | 1128 | |
| 5549 |
잘살아보자
|
11년 전 | 1609 | |
| 5548 |
잘살아보자
|
11년 전 | 1172 | |
| 5547 | 11년 전 | 1150 | ||
| 5546 |
잘살아보자
|
11년 전 | 1285 | |
| 5545 |
잘살아보자
|
11년 전 | 1841 | |
| 5544 | 11년 전 | 886 | ||
| 5543 | 11년 전 | 2139 | ||
| 5542 | 11년 전 | 976 | ||
| 5541 | 11년 전 | 1655 | ||
| 5540 |
잘살아보자
|
11년 전 | 1026 | |
| 5539 | 11년 전 | 1520 | ||
| 5538 | 11년 전 | 2616 | ||
| 5537 |
잘살아보자
|
11년 전 | 2252 | |
| 5536 | 11년 전 | 2288 | ||
| 5535 | 11년 전 | 3519 | ||
| 5534 |
돌아온깡통
|
11년 전 | 1066 | |
| 5533 |
돌아온깡통
|
11년 전 | 982 | |
| 5532 |
돌아온깡통
|
11년 전 | 863 | |
| 5531 |
돌아온깡통
|
11년 전 | 992 | |
| 5530 |
돌아온깡통
|
11년 전 | 767 | |
| 5529 |
돌아온깡통
|
11년 전 | 605 | |
| 5528 |
돌아온깡통
|
11년 전 | 990 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기