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

· 11년 전 · 2945


관련파일 : 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년 전 조회 2,841
11년 전 조회 2,864
11년 전 조회 2,838
11년 전 조회 2,302
11년 전 조회 2,704
11년 전 조회 3,051
11년 전 조회 2,995
11년 전 조회 2,319
11년 전 조회 2,681
11년 전 조회 2,473
11년 전 조회 3,205
11년 전 조회 2,843
11년 전 조회 2,200
11년 전 조회 3,600
11년 전 조회 8,124
11년 전 조회 2,745
11년 전 조회 2,621
11년 전 조회 2,490
11년 전 조회 2,379
11년 전 조회 2,937
11년 전 조회 2,305
11년 전 조회 4,884
11년 전 조회 2,731
11년 전 조회 3,109
11년 전 조회 2,471
11년 전 조회 4,012
11년 전 조회 2,797
11년 전 조회 4,151
11년 전 조회 3,463
11년 전 조회 3,956
11년 전 조회 2,965
11년 전 조회 4,047
11년 전 조회 2,891
11년 전 조회 2,576
11년 전 조회 2,558
11년 전 조회 6,932
11년 전 조회 2,753
11년 전 조회 2,304
11년 전 조회 2,254
11년 전 조회 2,644
11년 전 조회 3,002
11년 전 조회 3,431
11년 전 조회 3,747
11년 전 조회 2,678
11년 전 조회 2,927
11년 전 조회 2,887
11년 전 조회 2,491
11년 전 조회 2,305
11년 전 조회 3,686
11년 전 조회 2,946
11년 전 조회 4,769
11년 전 조회 2,690
11년 전 조회 2,602
11년 전 조회 3,639
11년 전 조회 4,305
11년 전 조회 3,639
11년 전 조회 4,669
11년 전 조회 3,063
11년 전 조회 4,829
11년 전 조회 2,351
11년 전 조회 2,649
11년 전 조회 3,462
11년 전 조회 3,812
11년 전 조회 2,420
11년 전 조회 4,351
11년 전 조회 4,517
11년 전 조회 3,073
11년 전 조회 3,739
11년 전 조회 2,603
11년 전 조회 2,904
11년 전 조회 2,618
11년 전 조회 3,824
11년 전 조회 3,695
11년 전 조회 2,736
11년 전 조회 6,835
11년 전 조회 3,921
11년 전 조회 4,638
11년 전 조회 3,473
11년 전 조회 2,510
11년 전 조회 3,588
11년 전 조회 3,712
11년 전 조회 3,396
11년 전 조회 3,020
11년 전 조회 2,505
11년 전 조회 3,374
11년 전 조회 4,164
11년 전 조회 2,833
11년 전 조회 4,352
11년 전 조회 3,294
11년 전 조회 6,138
11년 전 조회 3,384
11년 전 조회 4,051
11년 전 조회 5,283
11년 전 조회 3,170
11년 전 조회 4,011
11년 전 조회 2,352
11년 전 조회 3,419
11년 전 조회 6,070
11년 전 조회 3,222
11년 전 조회 3,394