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

· 11년 전 · 1426


관련파일 : 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,317
11년 전 조회 1,308
11년 전 조회 1,301
11년 전 조회 759
11년 전 조회 1,162
11년 전 조회 1,495
11년 전 조회 1,463
11년 전 조회 831
11년 전 조회 1,182
11년 전 조회 949
11년 전 조회 1,703
11년 전 조회 1,345
11년 전 조회 721
11년 전 조회 2,147
11년 전 조회 6,621
11년 전 조회 1,280
11년 전 조회 1,128
11년 전 조회 1,057
11년 전 조회 921
11년 전 조회 1,453
11년 전 조회 848
11년 전 조회 3,413
11년 전 조회 1,253
11년 전 조회 1,648
11년 전 조회 1,016
11년 전 조회 2,658
11년 전 조회 1,290
11년 전 조회 2,581
11년 전 조회 1,939
11년 전 조회 2,453
11년 전 조회 1,400
11년 전 조회 2,532
11년 전 조회 1,352
11년 전 조회 1,034
11년 전 조회 1,041
11년 전 조회 5,420
11년 전 조회 1,228
11년 전 조회 790
11년 전 조회 753
11년 전 조회 1,116
11년 전 조회 1,458
11년 전 조회 1,874
11년 전 조회 2,185
11년 전 조회 1,089
11년 전 조회 1,413
11년 전 조회 1,355
11년 전 조회 997
11년 전 조회 752
11년 전 조회 2,181
11년 전 조회 1,427
11년 전 조회 3,260
11년 전 조회 1,160
11년 전 조회 1,018
11년 전 조회 2,101
11년 전 조회 2,757
11년 전 조회 2,117
11년 전 조회 3,150
11년 전 조회 1,540
11년 전 조회 3,282
11년 전 조회 800
11년 전 조회 1,098
11년 전 조회 1,976
11년 전 조회 2,314
11년 전 조회 1,012
11년 전 조회 2,834
11년 전 조회 3,025
11년 전 조회 1,535
11년 전 조회 2,209
11년 전 조회 1,057
11년 전 조회 1,408
11년 전 조회 1,088
11년 전 조회 2,278
11년 전 조회 2,195
11년 전 조회 1,176
11년 전 조회 5,311
11년 전 조회 2,356
11년 전 조회 3,069
11년 전 조회 1,919
11년 전 조회 966
11년 전 조회 2,037
11년 전 조회 2,170
11년 전 조회 1,880
11년 전 조회 1,493
11년 전 조회 959
11년 전 조회 1,853
11년 전 조회 2,575
11년 전 조회 1,307
11년 전 조회 2,790
11년 전 조회 1,736
11년 전 조회 4,488
11년 전 조회 1,857
11년 전 조회 2,511
11년 전 조회 3,733
11년 전 조회 1,602
11년 전 조회 2,462
11년 전 조회 829
11년 전 조회 1,860
11년 전 조회 4,492
11년 전 조회 1,618
11년 전 조회 1,877
🐛 버그신고