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

· 11년 전 · 2264


관련파일 : 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,144
11년 전 조회 2,121
11년 전 조회 2,125
11년 전 조회 1,599
11년 전 조회 1,998
11년 전 조회 2,333
11년 전 조회 2,261
11년 전 조회 1,617
11년 전 조회 2,004
11년 전 조회 1,777
11년 전 조회 2,495
11년 전 조회 2,145
11년 전 조회 1,522
11년 전 조회 2,918
11년 전 조회 7,383
11년 전 조회 2,038
11년 전 조회 1,914
11년 전 조회 1,799
11년 전 조회 1,696
11년 전 조회 2,197
11년 전 조회 1,608
11년 전 조회 4,185
11년 전 조회 2,024
11년 전 조회 2,422
11년 전 조회 1,797
11년 전 조회 3,346
11년 전 조회 2,127
11년 전 조회 3,401
11년 전 조회 2,801
11년 전 조회 3,271
11년 전 조회 2,268
11년 전 조회 3,365
11년 전 조회 2,188
11년 전 조회 1,894
11년 전 조회 1,879
11년 전 조회 6,244
11년 전 조회 2,045
11년 전 조회 1,606
11년 전 조회 1,579
11년 전 조회 1,940
11년 전 조회 2,282
11년 전 조회 2,722
11년 전 조회 3,027
11년 전 조회 1,920
11년 전 조회 2,229
11년 전 조회 2,159
11년 전 조회 1,816
11년 전 조회 1,558
11년 전 조회 3,000
11년 전 조회 2,265
11년 전 조회 4,071
11년 전 조회 2,001
11년 전 조회 1,853
11년 전 조회 2,925
11년 전 조회 3,576
11년 전 조회 2,934
11년 전 조회 3,961
11년 전 조회 2,365
11년 전 조회 4,148
11년 전 조회 1,649
11년 전 조회 1,932
11년 전 조회 2,791
11년 전 조회 3,145
11년 전 조회 1,747
11년 전 조회 3,653
11년 전 조회 3,822
11년 전 조회 2,380
11년 전 조회 3,034
11년 전 조회 1,893
11년 전 조회 2,235
11년 전 조회 1,932
11년 전 조회 3,146
11년 전 조회 3,012
11년 전 조회 2,004
11년 전 조회 6,169
11년 전 조회 3,335
11년 전 조회 3,978
11년 전 조회 2,815
11년 전 조회 1,792
11년 전 조회 2,874
11년 전 조회 3,042
11년 전 조회 2,728
11년 전 조회 2,342
11년 전 조회 1,786
11년 전 조회 2,717
11년 전 조회 3,490
11년 전 조회 2,156
11년 전 조회 3,674
11년 전 조회 2,608
11년 전 조회 5,405
11년 전 조회 2,715
11년 전 조회 3,382
11년 전 조회 4,619
11년 전 조회 2,476
11년 전 조회 3,329
11년 전 조회 1,700
11년 전 조회 2,746
11년 전 조회 5,390
11년 전 조회 2,498
11년 전 조회 2,728