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

· 11년 전 · 1401


관련파일 : 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,289
11년 전 조회 1,279
11년 전 조회 1,271
11년 전 조회 734
11년 전 조회 1,133
11년 전 조회 1,475
11년 전 조회 1,436
11년 전 조회 811
11년 전 조회 1,155
11년 전 조회 922
11년 전 조회 1,676
11년 전 조회 1,317
11년 전 조회 695
11년 전 조회 2,131
11년 전 조회 6,596
11년 전 조회 1,262
11년 전 조회 1,104
11년 전 조회 1,041
11년 전 조회 892
11년 전 조회 1,425
11년 전 조회 824
11년 전 조회 3,384
11년 전 조회 1,226
11년 전 조회 1,621
11년 전 조회 993
11년 전 조회 2,626
11년 전 조회 1,264
11년 전 조회 2,550
11년 전 조회 1,915
11년 전 조회 2,426
11년 전 조회 1,373
11년 전 조회 2,508
11년 전 조회 1,318
11년 전 조회 1,010
11년 전 조회 1,023
11년 전 조회 5,403
11년 전 조회 1,197
11년 전 조회 762
11년 전 조회 739
11년 전 조회 1,087
11년 전 조회 1,432
11년 전 조회 1,849
11년 전 조회 2,159
11년 전 조회 1,066
11년 전 조회 1,388
11년 전 조회 1,331
11년 전 조회 975
11년 전 조회 729
11년 전 조회 2,157
11년 전 조회 1,402
11년 전 조회 3,234
11년 전 조회 1,135
11년 전 조회 992
11년 전 조회 2,076
11년 전 조회 2,729
11년 전 조회 2,092
11년 전 조회 3,125
11년 전 조회 1,509
11년 전 조회 3,257
11년 전 조회 772
11년 전 조회 1,070
11년 전 조회 1,947
11년 전 조회 2,298
11년 전 조회 1,005
11년 전 조회 2,814
11년 전 조회 3,015
11년 전 조회 1,506
11년 전 조회 2,182
11년 전 조회 1,037
11년 전 조회 1,388
11년 전 조회 1,060
11년 전 조회 2,254
11년 전 조회 2,171
11년 전 조회 1,157
11년 전 조회 5,289
11년 전 조회 2,340
11년 전 조회 3,053
11년 전 조회 1,901
11년 전 조회 940
11년 전 조회 2,022
11년 전 조회 2,150
11년 전 조회 1,869
11년 전 조회 1,480
11년 전 조회 935
11년 전 조회 1,834
11년 전 조회 2,556
11년 전 조회 1,284
11년 전 조회 2,767
11년 전 조회 1,712
11년 전 조회 4,465
11년 전 조회 1,838
11년 전 조회 2,493
11년 전 조회 3,708
11년 전 조회 1,575
11년 전 조회 2,448
11년 전 조회 802
11년 전 조회 1,835
11년 전 조회 4,468
11년 전 조회 1,592
11년 전 조회 1,853
🐛 버그신고