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

· 11년 전 · 1549


관련파일 : 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,441
11년 전 조회 1,435
11년 전 조회 1,437
11년 전 조회 892
11년 전 조회 1,293
11년 전 조회 1,624
11년 전 조회 1,584
11년 전 조회 953
11년 전 조회 1,302
11년 전 조회 1,071
11년 전 조회 1,833
11년 전 조회 1,470
11년 전 조회 857
11년 전 조회 2,283
11년 전 조회 6,751
11년 전 조회 1,409
11년 전 조회 1,260
11년 전 조회 1,194
11년 전 조회 1,054
11년 전 조회 1,583
11년 전 조회 965
11년 전 조회 3,542
11년 전 조회 1,373
11년 전 조회 1,791
11년 전 조회 1,151
11년 전 조회 2,789
11년 전 조회 1,419
11년 전 조회 2,705
11년 전 조회 2,069
11년 전 조회 2,588
11년 전 조회 1,537
11년 전 조회 2,657
11년 전 조회 1,468
11년 전 조회 1,170
11년 전 조회 1,169
11년 전 조회 5,549
11년 전 조회 1,382
11년 전 조회 921
11년 전 조회 880
11년 전 조회 1,249
11년 전 조회 1,589
11년 전 조회 2,019
11년 전 조회 2,319
11년 전 조회 1,226
11년 전 조회 1,539
11년 전 조회 1,482
11년 전 조회 1,124
11년 전 조회 893
11년 전 조회 2,311
11년 전 조회 1,550
11년 전 조회 3,376
11년 전 조회 1,300
11년 전 조회 1,135
11년 전 조회 2,236
11년 전 조회 2,883
11년 전 조회 2,243
11년 전 조회 3,287
11년 전 조회 1,671
11년 전 조회 3,413
11년 전 조회 927
11년 전 조회 1,214
11년 전 조회 2,101
11년 전 조회 2,441
11년 전 조회 1,115
11년 전 조회 2,951
11년 전 조회 3,136
11년 전 조회 1,668
11년 전 조회 2,332
11년 전 조회 1,199
11년 전 조회 1,527
11년 전 조회 1,205
11년 전 조회 2,410
11년 전 조회 2,312
11년 전 조회 1,305
11년 전 조회 5,432
11년 전 조회 2,478
11년 전 조회 3,204
11년 전 조회 2,049
11년 전 조회 1,088
11년 전 조회 2,159
11년 전 조회 2,294
11년 전 조회 2,008
11년 전 조회 1,606
11년 전 조회 1,103
11년 전 조회 1,974
11년 전 조회 2,708
11년 전 조회 1,428
11년 전 조회 2,918
11년 전 조회 1,872
11년 전 조회 4,620
11년 전 조회 1,990
11년 전 조회 2,638
11년 전 조회 3,857
11년 전 조회 1,728
11년 전 조회 2,583
11년 전 조회 952
11년 전 조회 1,979
11년 전 조회 4,612
11년 전 조회 1,746
11년 전 조회 2,004
🐛 버그신고