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

· 11년 전 · 1410


관련파일 : 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,305
11년 전 조회 1,294
11년 전 조회 1,289
11년 전 조회 748
11년 전 조회 1,146
11년 전 조회 1,485
11년 전 조회 1,452
11년 전 조회 820
11년 전 조회 1,168
11년 전 조회 936
11년 전 조회 1,690
11년 전 조회 1,332
11년 전 조회 712
11년 전 조회 2,139
11년 전 조회 6,610
11년 전 조회 1,272
11년 전 조회 1,119
11년 전 조회 1,048
11년 전 조회 905
11년 전 조회 1,440
11년 전 조회 832
11년 전 조회 3,395
11년 전 조회 1,240
11년 전 조회 1,630
11년 전 조회 1,007
11년 전 조회 2,642
11년 전 조회 1,273
11년 전 조회 2,561
11년 전 조회 1,924
11년 전 조회 2,436
11년 전 조회 1,388
11년 전 조회 2,517
11년 전 조회 1,331
11년 전 조회 1,024
11년 전 조회 1,030
11년 전 조회 5,410
11년 전 조회 1,211
11년 전 조회 776
11년 전 조회 746
11년 전 조회 1,100
11년 전 조회 1,446
11년 전 조회 1,864
11년 전 조회 2,172
11년 전 조회 1,077
11년 전 조회 1,401
11년 전 조회 1,343
11년 전 조회 983
11년 전 조회 738
11년 전 조회 2,167
11년 전 조회 1,411
11년 전 조회 3,246
11년 전 조회 1,147
11년 전 조회 1,005
11년 전 조회 2,087
11년 전 조회 2,741
11년 전 조회 2,102
11년 전 조회 3,138
11년 전 조회 1,523
11년 전 조회 3,270
11년 전 조회 786
11년 전 조회 1,086
11년 전 조회 1,956
11년 전 조회 2,305
11년 전 조회 1,009
11년 전 조회 2,821
11년 전 조회 3,019
11년 전 조회 1,523
11년 전 조회 2,196
11년 전 조회 1,045
11년 전 조회 1,395
11년 전 조회 1,074
11년 전 조회 2,268
11년 전 조회 2,185
11년 전 조회 1,166
11년 전 조회 5,294
11년 전 조회 2,344
11년 전 조회 3,062
11년 전 조회 1,911
11년 전 조회 952
11년 전 조회 2,028
11년 전 조회 2,162
11년 전 조회 1,873
11년 전 조회 1,484
11년 전 조회 947
11년 전 조회 1,838
11년 전 조회 2,565
11년 전 조회 1,290
11년 전 조회 2,778
11년 전 조회 1,724
11년 전 조회 4,476
11년 전 조회 1,846
11년 전 조회 2,502
11년 전 조회 3,716
11년 전 조회 1,589
11년 전 조회 2,454
11년 전 조회 818
11년 전 조회 1,846
11년 전 조회 4,482
11년 전 조회 1,604
11년 전 조회 1,862
🐛 버그신고