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

· 11년 전 · 2743


관련파일 : 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,617
11년 전 조회 2,646
11년 전 조회 2,634
11년 전 조회 2,080
11년 전 조회 2,472
11년 전 조회 2,834
11년 전 조회 2,752
11년 전 조회 2,114
11년 전 조회 2,472
11년 전 조회 2,251
11년 전 조회 2,958
11년 전 조회 2,627
11년 전 조회 1,989
11년 전 조회 3,376
11년 전 조회 7,901
11년 전 조회 2,530
11년 전 조회 2,410
11년 전 조회 2,292
11년 전 조회 2,174
11년 전 조회 2,719
11년 전 조회 2,102
11년 전 조회 4,662
11년 전 조회 2,515
11년 전 조회 2,889
11년 전 조회 2,241
11년 전 조회 3,799
11년 전 조회 2,565
11년 전 조회 3,917
11년 전 조회 3,241
11년 전 조회 3,737
11년 전 조회 2,748
11년 전 조회 3,840
11년 전 조회 2,660
11년 전 조회 2,367
11년 전 조회 2,341
11년 전 조회 6,736
11년 전 조회 2,537
11년 전 조회 2,072
11년 전 조회 2,057
11년 전 조회 2,420
11년 전 조회 2,784
11년 전 조회 3,213
11년 전 조회 3,526
11년 전 조회 2,443
11년 전 조회 2,716
11년 전 조회 2,676
11년 전 조회 2,279
11년 전 조회 2,089
11년 전 조회 3,485
11년 전 조회 2,744
11년 전 조회 4,549
11년 전 조회 2,490
11년 전 조회 2,357
11년 전 조회 3,423
11년 전 조회 4,073
11년 전 조회 3,422
11년 전 조회 4,470
11년 전 조회 2,856
11년 전 조회 4,598
11년 전 조회 2,137
11년 전 조회 2,422
11년 전 조회 3,258
11년 전 조회 3,619
11년 전 조회 2,227
11년 전 조회 4,153
11년 전 조회 4,331
11년 전 조회 2,852
11년 전 조회 3,561
11년 전 조회 2,410
11년 전 조회 2,722
11년 전 조회 2,413
11년 전 조회 3,636
11년 전 조회 3,498
11년 전 조회 2,540
11년 전 조회 6,639
11년 전 조회 3,725
11년 전 조회 4,426
11년 전 조회 3,273
11년 전 조회 2,317
11년 전 조회 3,394
11년 전 조회 3,525
11년 전 조회 3,214
11년 전 조회 2,829
11년 전 조회 2,309
11년 전 조회 3,189
11년 전 조회 3,946
11년 전 조회 2,641
11년 전 조회 4,161
11년 전 조회 3,104
11년 전 조회 5,932
11년 전 조회 3,185
11년 전 조회 3,885
11년 전 조회 5,076
11년 전 조회 2,984
11년 전 조회 3,814
11년 전 조회 2,180
11년 전 조회 3,213
11년 전 조회 5,875
11년 전 조회 3,022
11년 전 조회 3,222