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

· 11년 전 · 1409


관련파일 : 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,302
11년 전 조회 1,294
11년 전 조회 1,287
11년 전 조회 744
11년 전 조회 1,146
11년 전 조회 1,485
11년 전 조회 1,452
11년 전 조회 820
11년 전 조회 1,167
11년 전 조회 935
11년 전 조회 1,689
11년 전 조회 1,332
11년 전 조회 710
11년 전 조회 2,139
11년 전 조회 6,609
11년 전 조회 1,272
11년 전 조회 1,118
11년 전 조회 1,048
11년 전 조회 903
11년 전 조회 1,438
11년 전 조회 831
11년 전 조회 3,395
11년 전 조회 1,239
11년 전 조회 1,630
11년 전 조회 1,007
11년 전 조회 2,640
11년 전 조회 1,273
11년 전 조회 2,560
11년 전 조회 1,924
11년 전 조회 2,434
11년 전 조회 1,387
11년 전 조회 2,516
11년 전 조회 1,329
11년 전 조회 1,023
11년 전 조회 1,030
11년 전 조회 5,410
11년 전 조회 1,209
11년 전 조회 776
11년 전 조회 744
11년 전 조회 1,099
11년 전 조회 1,444
11년 전 조회 1,864
11년 전 조회 2,171
11년 전 조회 1,076
11년 전 조회 1,401
11년 전 조회 1,343
11년 전 조회 982
11년 전 조회 738
11년 전 조회 2,164
11년 전 조회 1,410
11년 전 조회 3,244
11년 전 조회 1,146
11년 전 조회 1,004
11년 전 조회 2,086
11년 전 조회 2,739
11년 전 조회 2,100
11년 전 조회 3,138
11년 전 조회 1,523
11년 전 조회 3,268
11년 전 조회 784
11년 전 조회 1,085
11년 전 조회 1,954
11년 전 조회 2,305
11년 전 조회 1,008
11년 전 조회 2,820
11년 전 조회 3,019
11년 전 조회 1,520
11년 전 조회 2,195
11년 전 조회 1,045
11년 전 조회 1,394
11년 전 조회 1,072
11년 전 조회 2,267
11년 전 조회 2,185
11년 전 조회 1,164
11년 전 조회 5,293
11년 전 조회 2,344
11년 전 조회 3,061
11년 전 조회 1,909
11년 전 조회 951
11년 전 조회 2,027
11년 전 조회 2,159
11년 전 조회 1,872
11년 전 조회 1,484
11년 전 조회 945
11년 전 조회 1,837
11년 전 조회 2,564
11년 전 조회 1,289
11년 전 조회 2,776
11년 전 조회 1,721
11년 전 조회 4,474
11년 전 조회 1,845
11년 전 조회 2,501
11년 전 조회 3,715
11년 전 조회 1,587
11년 전 조회 2,454
11년 전 조회 816
11년 전 조회 1,844
11년 전 조회 4,480
11년 전 조회 1,601
11년 전 조회 1,861
🐛 버그신고