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

· 11년 전 · 2764


관련파일 : 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,643
11년 전 조회 2,664
11년 전 조회 2,656
11년 전 조회 2,102
11년 전 조회 2,490
11년 전 조회 2,855
11년 전 조회 2,771
11년 전 조회 2,138
11년 전 조회 2,493
11년 전 조회 2,275
11년 전 조회 2,985
11년 전 조회 2,648
11년 전 조회 2,009
11년 전 조회 3,398
11년 전 조회 7,919
11년 전 조회 2,547
11년 전 조회 2,427
11년 전 조회 2,311
11년 전 조회 2,188
11년 전 조회 2,736
11년 전 조회 2,127
11년 전 조회 4,686
11년 전 조회 2,534
11년 전 조회 2,911
11년 전 조회 2,263
11년 전 조회 3,819
11년 전 조회 2,583
11년 전 조회 3,938
11년 전 조회 3,263
11년 전 조회 3,755
11년 전 조회 2,763
11년 전 조회 3,858
11년 전 조회 2,675
11년 전 조회 2,385
11년 전 조회 2,361
11년 전 조회 6,750
11년 전 조회 2,555
11년 전 조회 2,089
11년 전 조회 2,081
11년 전 조회 2,436
11년 전 조회 2,807
11년 전 조회 3,231
11년 전 조회 3,547
11년 전 조회 2,460
11년 전 조회 2,728
11년 전 조회 2,692
11년 전 조회 2,299
11년 전 조회 2,111
11년 전 조회 3,504
11년 전 조회 2,765
11년 전 조회 4,572
11년 전 조회 2,507
11년 전 조회 2,378
11년 전 조회 3,438
11년 전 조회 4,093
11년 전 조회 3,446
11년 전 조회 4,486
11년 전 조회 2,869
11년 전 조회 4,623
11년 전 조회 2,154
11년 전 조회 2,445
11년 전 조회 3,274
11년 전 조회 3,643
11년 전 조회 2,248
11년 전 조회 4,174
11년 전 조회 4,353
11년 전 조회 2,872
11년 전 조회 3,576
11년 전 조회 2,426
11년 전 조회 2,743
11년 전 조회 2,433
11년 전 조회 3,661
11년 전 조회 3,519
11년 전 조회 2,562
11년 전 조회 6,660
11년 전 조회 3,754
11년 전 조회 4,449
11년 전 조회 3,290
11년 전 조회 2,331
11년 전 조회 3,408
11년 전 조회 3,538
11년 전 조회 3,228
11년 전 조회 2,857
11년 전 조회 2,331
11년 전 조회 3,213
11년 전 조회 3,961
11년 전 조회 2,658
11년 전 조회 4,175
11년 전 조회 3,125
11년 전 조회 5,956
11년 전 조회 3,205
11년 전 조회 3,899
11년 전 조회 5,096
11년 전 조회 3,004
11년 전 조회 3,840
11년 전 조회 2,196
11년 전 조회 3,238
11년 전 조회 5,894
11년 전 조회 3,050
11년 전 조회 3,243