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

· 11년 전 · 1422


관련파일 : 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,313
11년 전 조회 1,307
11년 전 조회 1,299
11년 전 조회 757
11년 전 조회 1,161
11년 전 조회 1,494
11년 전 조회 1,462
11년 전 조회 829
11년 전 조회 1,180
11년 전 조회 946
11년 전 조회 1,701
11년 전 조회 1,342
11년 전 조회 718
11년 전 조회 2,147
11년 전 조회 6,620
11년 전 조회 1,280
11년 전 조회 1,127
11년 전 조회 1,055
11년 전 조회 919
11년 전 조회 1,452
11년 전 조회 845
11년 전 조회 3,411
11년 전 조회 1,250
11년 전 조회 1,645
11년 전 조회 1,011
11년 전 조회 2,655
11년 전 조회 1,286
11년 전 조회 2,577
11년 전 조회 1,938
11년 전 조회 2,451
11년 전 조회 1,399
11년 전 조회 2,532
11년 전 조회 1,346
11년 전 조회 1,032
11년 전 조회 1,039
11년 전 조회 5,419
11년 전 조회 1,224
11년 전 조회 787
11년 전 조회 752
11년 전 조회 1,113
11년 전 조회 1,454
11년 전 조회 1,870
11년 전 조회 2,182
11년 전 조회 1,086
11년 전 조회 1,408
11년 전 조회 1,353
11년 전 조회 996
11년 전 조회 749
11년 전 조회 2,180
11년 전 조회 1,423
11년 전 조회 3,258
11년 전 조회 1,157
11년 전 조회 1,016
11년 전 조회 2,099
11년 전 조회 2,754
11년 전 조회 2,116
11년 전 조회 3,149
11년 전 조회 1,536
11년 전 조회 3,280
11년 전 조회 793
11년 전 조회 1,095
11년 전 조회 1,972
11년 전 조회 2,312
11년 전 조회 1,012
11년 전 조회 2,831
11년 전 조회 3,024
11년 전 조회 1,534
11년 전 조회 2,205
11년 전 조회 1,051
11년 전 조회 1,406
11년 전 조회 1,083
11년 전 조회 2,277
11년 전 조회 2,193
11년 전 조회 1,175
11년 전 조회 5,310
11년 전 조회 2,353
11년 전 조회 3,069
11년 전 조회 1,919
11년 전 조회 965
11년 전 조회 2,034
11년 전 조회 2,169
11년 전 조회 1,878
11년 전 조회 1,490
11년 전 조회 959
11년 전 조회 1,853
11년 전 조회 2,575
11년 전 조회 1,302
11년 전 조회 2,790
11년 전 조회 1,733
11년 전 조회 4,485
11년 전 조회 1,855
11년 전 조회 2,510
11년 전 조회 3,729
11년 전 조회 1,600
11년 전 조회 2,459
11년 전 조회 827
11년 전 조회 1,860
11년 전 조회 4,490
11년 전 조회 1,614
11년 전 조회 1,874
🐛 버그신고