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

· 11년 전 · 1492


관련파일 : 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,386
11년 전 조회 1,382
11년 전 조회 1,377
11년 전 조회 837
11년 전 조회 1,237
11년 전 조회 1,574
11년 전 조회 1,537
11년 전 조회 906
11년 전 조회 1,254
11년 전 조회 1,018
11년 전 조회 1,771
11년 전 조회 1,417
11년 전 조회 794
11년 전 조회 2,220
11년 전 조회 6,694
11년 전 조회 1,356
11년 전 조회 1,196
11년 전 조회 1,135
11년 전 조회 991
11년 전 조회 1,521
11년 전 조회 916
11년 전 조회 3,487
11년 전 조회 1,322
11년 전 조회 1,723
11년 전 조회 1,090
11년 전 조회 2,730
11년 전 조회 1,376
11년 전 조회 2,649
11년 전 조회 2,016
11년 전 조회 2,528
11년 전 조회 1,481
11년 전 조회 2,611
11년 전 조회 1,411
11년 전 조회 1,118
11년 전 조회 1,121
11년 전 조회 5,489
11년 전 조회 1,298
11년 전 조회 858
11년 전 조회 823
11년 전 조회 1,180
11년 전 조회 1,527
11년 전 조회 1,945
11년 전 조회 2,255
11년 전 조회 1,169
11년 전 조회 1,483
11년 전 조회 1,423
11년 전 조회 1,077
11년 전 조회 830
11년 전 조회 2,261
11년 전 조회 1,493
11년 전 조회 3,334
11년 전 조회 1,235
11년 전 조회 1,063
11년 전 조회 2,167
11년 전 조회 2,826
11년 전 조회 2,185
11년 전 조회 3,220
11년 전 조회 1,601
11년 전 조회 3,351
11년 전 조회 866
11년 전 조회 1,164
11년 전 조회 2,053
11년 전 조회 2,385
11년 전 조회 1,073
11년 전 조회 2,894
11년 전 조회 3,091
11년 전 조회 1,606
11년 전 조회 2,281
11년 전 조회 1,128
11년 전 조회 1,470
11년 전 조회 1,148
11년 전 조회 2,349
11년 전 조회 2,255
11년 전 조회 1,247
11년 전 조회 5,371
11년 전 조회 2,419
11년 전 조회 3,141
11년 전 조회 1,992
11년 전 조회 1,034
11년 전 조회 2,102
11년 전 조회 2,238
11년 전 조회 1,953
11년 전 조회 1,557
11년 전 조회 1,031
11년 전 조회 1,915
11년 전 조회 2,644
11년 전 조회 1,367
11년 전 조회 2,858
11년 전 조회 1,809
11년 전 조회 4,554
11년 전 조회 1,923
11년 전 조회 2,573
11년 전 조회 3,795
11년 전 조회 1,662
11년 전 조회 2,528
11년 전 조회 888
11년 전 조회 1,923
11년 전 조회 4,555
11년 전 조회 1,688
11년 전 조회 1,944
🐛 버그신고