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

· 11년 전 · 1408


관련파일 : 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,300
11년 전 조회 1,290
11년 전 조회 1,282
11년 전 조회 744
11년 전 조회 1,145
11년 전 조회 1,484
11년 전 조회 1,450
11년 전 조회 819
11년 전 조회 1,166
11년 전 조회 932
11년 전 조회 1,686
11년 전 조회 1,329
11년 전 조회 705
11년 전 조회 2,137
11년 전 조회 6,608
11년 전 조회 1,271
11년 전 조회 1,118
11년 전 조회 1,047
11년 전 조회 902
11년 전 조회 1,436
11년 전 조회 831
11년 전 조회 3,393
11년 전 조회 1,238
11년 전 조회 1,630
11년 전 조회 1,005
11년 전 조회 2,640
11년 전 조회 1,271
11년 전 조회 2,557
11년 전 조회 1,923
11년 전 조회 2,434
11년 전 조회 1,387
11년 전 조회 2,515
11년 전 조회 1,328
11년 전 조회 1,023
11년 전 조회 1,029
11년 전 조회 5,409
11년 전 조회 1,207
11년 전 조회 774
11년 전 조회 744
11년 전 조회 1,097
11년 전 조회 1,442
11년 전 조회 1,861
11년 전 조회 2,169
11년 전 조회 1,074
11년 전 조회 1,397
11년 전 조회 1,342
11년 전 조회 981
11년 전 조회 736
11년 전 조회 2,164
11년 전 조회 1,409
11년 전 조회 3,244
11년 전 조회 1,145
11년 전 조회 1,001
11년 전 조회 2,085
11년 전 조회 2,739
11년 전 조회 2,099
11년 전 조회 3,133
11년 전 조회 1,522
11년 전 조회 3,266
11년 전 조회 783
11년 전 조회 1,081
11년 전 조회 1,954
11년 전 조회 2,304
11년 전 조회 1,007
11년 전 조회 2,820
11년 전 조회 3,018
11년 전 조회 1,518
11년 전 조회 2,194
11년 전 조회 1,045
11년 전 조회 1,393
11년 전 조회 1,070
11년 전 조회 2,266
11년 전 조회 2,182
11년 전 조회 1,164
11년 전 조회 5,293
11년 전 조회 2,344
11년 전 조회 3,060
11년 전 조회 1,909
11년 전 조회 949
11년 전 조회 2,026
11년 전 조회 2,157
11년 전 조회 1,872
11년 전 조회 1,484
11년 전 조회 945
11년 전 조회 1,837
11년 전 조회 2,564
11년 전 조회 1,288
11년 전 조회 2,775
11년 전 조회 1,719
11년 전 조회 4,472
11년 전 조회 1,844
11년 전 조회 2,501
11년 전 조회 3,713
11년 전 조회 1,586
11년 전 조회 2,454
11년 전 조회 816
11년 전 조회 1,844
11년 전 조회 4,477
11년 전 조회 1,601
11년 전 조회 1,859
🐛 버그신고