그누보드4 에 Daum 우편번호 찾기 API 연동 하기.

· 11년 전 · 1583


관련파일 : skin/member/basic/register_form.skin.php

<a href="javascript:;" onclick="win_zip('fregisterform', 'mb_zip1', 'mb_zip2', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');" align=absmiddle><img width="74" height="20" src="<?=$member_skin_path?>/img/post_search_btn.gif" border=0 align=absmiddle></a>


<a href="javascript:;" onclick="openDaumPostcode();" align=absmiddle><img width="74" height="20" src="<?=$member_skin_path?>/img/post_search_btn.gif" border=0 align=absmiddle></a>

그리고 맨 하단에 아래 자바스크립트 코드를 추가합니다.

<script type="text/javascript">
<!--
    function openDaumPostcode() {
        new daum.Postcode({
            oncomplete: function(data) {
                document.forms.fregisterform.mb_zip1.value = data.postcode1;
                document.forms.fregisterform.mb_zip2.value = data.postcode2;
                document.forms.fregisterform.mb_addr1.value = data.address;
                document.forms.fregisterform.mb_addr2.focus();
                //document.forms.fregisterform.mb_addr3.value = data.addressEnglish;
            }
        }).open();
    }
//-->
</script>

모바일도 동일하게 처리하시면 됩니다.
단 모바일은 아래처럼 사이즈를 100% 로 잡아주세요.

<script type="text/javascript">
<!--
    function openDaumPostcode() {
        new daum.Postcode({
            oncomplete: function(data) {
                document.forms.fregisterform.mb_zip1.value = data.postcode1;
                document.forms.fregisterform.mb_zip2.value = data.postcode2;
                document.forms.fregisterform.mb_addr1.value = data.address;
                document.forms.fregisterform.mb_addr2.focus();
                //document.forms.fregisterform.mb_addr3.value = data.addressEnglish;
            },
            width : '100%',
            height : '100%'
        }).open();
    }
//-->
</script>

첨부파일

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
11년 전 조회 1,471
11년 전 조회 1,470
11년 전 조회 1,474
11년 전 조회 927
11년 전 조회 1,327
11년 전 조회 1,653
11년 전 조회 1,621
11년 전 조회 988
11년 전 조회 1,339
11년 전 조회 1,115
11년 전 조회 1,865
11년 전 조회 1,510
11년 전 조회 902
11년 전 조회 2,313
11년 전 조회 6,791
11년 전 조회 1,446
11년 전 조회 1,305
11년 전 조회 1,220
11년 전 조회 1,083
11년 전 조회 1,618
11년 전 조회 996
11년 전 조회 3,587
11년 전 조회 1,415
11년 전 조회 1,810
11년 전 조회 1,186
11년 전 조회 2,824
11년 전 조회 1,452
11년 전 조회 2,734
11년 전 조회 2,101
11년 전 조회 2,620
11년 전 조회 1,568
11년 전 조회 2,700
11년 전 조회 1,503
11년 전 조회 1,212
11년 전 조회 1,205
11년 전 조회 5,569
11년 전 조회 1,413
11년 전 조회 957
11년 전 조회 913
11년 전 조회 1,293
11년 전 조회 1,620
11년 전 조회 2,055
11년 전 조회 2,369
11년 전 조회 1,269
11년 전 조회 1,577
11년 전 조회 1,524
11년 전 조회 1,157
11년 전 조회 947
11년 전 조회 2,344
11년 전 조회 1,584
11년 전 조회 3,411
11년 전 조회 1,340
11년 전 조회 1,184
11년 전 조회 2,271
11년 전 조회 2,916
11년 전 조회 2,278
11년 전 조회 3,327
11년 전 조회 1,706
11년 전 조회 3,450
11년 전 조회 966
11년 전 조회 1,261
11년 전 조회 2,139
11년 전 조회 2,472
11년 전 조회 1,136
11년 전 조회 2,994
11년 전 조회 3,167
11년 전 조회 1,711
11년 전 조회 2,371
11년 전 조회 1,234
11년 전 조회 1,564
11년 전 조회 1,257
11년 전 조회 2,458
11년 전 조회 2,350
11년 전 조회 1,338
11년 전 조회 5,469
11년 전 조회 2,520
11년 전 조회 3,243
11년 전 조회 2,093
11년 전 조회 1,128
11년 전 조회 2,198
11년 전 조회 2,338
11년 전 조회 2,040
11년 전 조회 1,637
11년 전 조회 1,138
11년 전 조회 2,010
11년 전 조회 2,751
11년 전 조회 1,473
11년 전 조회 2,965
11년 전 조회 1,911
11년 전 조회 4,661
11년 전 조회 2,018
11년 전 조회 2,680
11년 전 조회 3,900
11년 전 조회 1,768
11년 전 조회 2,623
11년 전 조회 993
11년 전 조회 2,029
11년 전 조회 4,660
11년 전 조회 1,790
11년 전 조회 2,045
🐛 버그신고