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

· 11년 전 · 2941


관련파일 : 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,840
11년 전 조회 2,858
11년 전 조회 2,834
11년 전 조회 2,296
11년 전 조회 2,697
11년 전 조회 3,049
11년 전 조회 2,994
11년 전 조회 2,318
11년 전 조회 2,680
11년 전 조회 2,469
11년 전 조회 3,201
11년 전 조회 2,840
11년 전 조회 2,195
11년 전 조회 3,598
11년 전 조회 8,118
11년 전 조회 2,743
11년 전 조회 2,621
11년 전 조회 2,489
11년 전 조회 2,376
11년 전 조회 2,936
11년 전 조회 2,301
11년 전 조회 4,882
11년 전 조회 2,729
11년 전 조회 3,106
11년 전 조회 2,464
11년 전 조회 4,008
11년 전 조회 2,796
11년 전 조회 4,150
11년 전 조회 3,461
11년 전 조회 3,950
11년 전 조회 2,958
11년 전 조회 4,044
11년 전 조회 2,887
11년 전 조회 2,574
11년 전 조회 2,552
11년 전 조회 6,928
11년 전 조회 2,750
11년 전 조회 2,299
11년 전 조회 2,252
11년 전 조회 2,641
11년 전 조회 2,999
11년 전 조회 3,428
11년 전 조회 3,740
11년 전 조회 2,674
11년 전 조회 2,922
11년 전 조회 2,882
11년 전 조회 2,489
11년 전 조회 2,301
11년 전 조회 3,685
11년 전 조회 2,942
11년 전 조회 4,765
11년 전 조회 2,687
11년 전 조회 2,599
11년 전 조회 3,634
11년 전 조회 4,301
11년 전 조회 3,639
11년 전 조회 4,668
11년 전 조회 3,060
11년 전 조회 4,827
11년 전 조회 2,348
11년 전 조회 2,647
11년 전 조회 3,459
11년 전 조회 3,809
11년 전 조회 2,416
11년 전 조회 4,349
11년 전 조회 4,512
11년 전 조회 3,070
11년 전 조회 3,735
11년 전 조회 2,600
11년 전 조회 2,902
11년 전 조회 2,610
11년 전 조회 3,822
11년 전 조회 3,693
11년 전 조회 2,733
11년 전 조회 6,834
11년 전 조회 3,919
11년 전 조회 4,635
11년 전 조회 3,470
11년 전 조회 2,506
11년 전 조회 3,586
11년 전 조회 3,712
11년 전 조회 3,392
11년 전 조회 3,018
11년 전 조회 2,502
11년 전 조회 3,372
11년 전 조회 4,159
11년 전 조회 2,829
11년 전 조회 4,349
11년 전 조회 3,290
11년 전 조회 6,135
11년 전 조회 3,383
11년 전 조회 4,048
11년 전 조회 5,277
11년 전 조회 3,167
11년 전 조회 4,008
11년 전 조회 2,348
11년 전 조회 3,418
11년 전 조회 6,064
11년 전 조회 3,219
11년 전 조회 3,392