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

· 11년 전 · 2569


관련파일 : 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,412
11년 전 조회 2,421
11년 전 조회 2,424
11년 전 조회 1,874
11년 전 조회 2,279
11년 전 조회 2,649
11년 전 조회 2,537
11년 전 조회 1,922
11년 전 조회 2,282
11년 전 조회 2,054
11년 전 조회 2,786
11년 전 조회 2,436
11년 전 조회 1,796
11년 전 조회 3,190
11년 전 조회 7,691
11년 전 조회 2,333
11년 전 조회 2,188
11년 전 조회 2,105
11년 전 조회 1,959
11년 전 조회 2,503
11년 전 조회 1,920
11년 전 조회 4,467
11년 전 조회 2,320
11년 전 조회 2,709
11년 전 조회 2,059
11년 전 조회 3,605
11년 전 조회 2,409
11년 전 조회 3,717
11년 전 조회 3,077
11년 전 조회 3,545
11년 전 조회 2,578
11년 전 조회 3,659
11년 전 조회 2,466
11년 전 조회 2,167
11년 전 조회 2,193
11년 전 조회 6,562
11년 전 조회 2,357
11년 전 조회 1,903
11년 전 조회 1,872
11년 전 조회 2,214
11년 전 조회 2,575
11년 전 조회 3,010
11년 전 조회 3,327
11년 전 조회 2,238
11년 전 조회 2,517
11년 전 조회 2,456
11년 전 조회 2,099
11년 전 조회 1,874
11년 전 조회 3,316
11년 전 조회 2,570
11년 전 조회 4,368
11년 전 조회 2,286
11년 전 조회 2,139
11년 전 조회 3,212
11년 전 조회 3,870
11년 전 조회 3,221
11년 전 조회 4,255
11년 전 조회 2,647
11년 전 조회 4,421
11년 전 조회 1,940
11년 전 조회 2,219
11년 전 조회 3,080
11년 전 조회 3,424
11년 전 조회 2,035
11년 전 조회 3,937
11년 전 조회 4,142
11년 전 조회 2,645
11년 전 조회 3,318
11년 전 조회 2,178
11년 전 조회 2,529
11년 전 조회 2,205
11년 전 조회 3,424
11년 전 조회 3,291
11년 전 조회 2,309
11년 전 조회 6,449
11년 전 조회 3,531
11년 전 조회 4,234
11년 전 조회 3,073
11년 전 조회 2,067
11년 전 조회 3,162
11년 전 조회 3,335
11년 전 조회 3,009
11년 전 조회 2,644
11년 전 조회 2,079
11년 전 조회 3,006
11년 전 조회 3,785
11년 전 조회 2,481
11년 전 조회 3,946
11년 전 조회 2,919
11년 전 조회 5,738
11년 전 조회 2,995
11년 전 조회 3,672
11년 전 조회 4,907
11년 전 조회 2,761
11년 전 조회 3,610
11년 전 조회 1,974
11년 전 조회 3,015
11년 전 조회 5,668
11년 전 조회 2,772
11년 전 조회 3,017