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

· 11년 전 · 2527


관련파일 : 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,395
11년 전 조회 2,389
11년 전 조회 2,397
11년 전 조회 1,840
11년 전 조회 2,253
11년 전 조회 2,618
11년 전 조회 2,516
11년 전 조회 1,883
11년 전 조회 2,249
11년 전 조회 2,021
11년 전 조회 2,750
11년 전 조회 2,396
11년 전 조회 1,764
11년 전 조회 3,155
11년 전 조회 7,655
11년 전 조회 2,301
11년 전 조회 2,160
11년 전 조회 2,066
11년 전 조회 1,923
11년 전 조회 2,467
11년 전 조회 1,890
11년 전 조회 4,433
11년 전 조회 2,292
11년 전 조회 2,683
11년 전 조회 2,029
11년 전 조회 3,565
11년 전 조회 2,373
11년 전 조회 3,684
11년 전 조회 3,039
11년 전 조회 3,517
11년 전 조회 2,536
11년 전 조회 3,636
11년 전 조회 2,437
11년 전 조회 2,138
11년 전 조회 2,156
11년 전 조회 6,528
11년 전 조회 2,332
11년 전 조회 1,874
11년 전 조회 1,844
11년 전 조회 2,185
11년 전 조회 2,543
11년 전 조회 2,974
11년 전 조회 3,287
11년 전 조회 2,214
11년 전 조회 2,493
11년 전 조회 2,427
11년 전 조회 2,073
11년 전 조회 1,837
11년 전 조회 3,274
11년 전 조회 2,528
11년 전 조회 4,342
11년 전 조회 2,250
11년 전 조회 2,111
11년 전 조회 3,176
11년 전 조회 3,847
11년 전 조회 3,192
11년 전 조회 4,222
11년 전 조회 2,615
11년 전 조회 4,395
11년 전 조회 1,909
11년 전 조회 2,187
11년 전 조회 3,046
11년 전 조회 3,392
11년 전 조회 1,997
11년 전 조회 3,904
11년 전 조회 4,113
11년 전 조회 2,618
11년 전 조회 3,284
11년 전 조회 2,148
11년 전 조회 2,503
11년 전 조회 2,172
11년 전 조회 3,404
11년 전 조회 3,261
11년 전 조회 2,274
11년 전 조회 6,410
11년 전 조회 3,497
11년 전 조회 4,202
11년 전 조회 3,042
11년 전 조회 2,030
11년 전 조회 3,135
11년 전 조회 3,293
11년 전 조회 2,968
11년 전 조회 2,607
11년 전 조회 2,046
11년 전 조회 2,980
11년 전 조회 3,748
11년 전 조회 2,435
11년 전 조회 3,912
11년 전 조회 2,879
11년 전 조회 5,689
11년 전 조회 2,964
11년 전 조회 3,636
11년 전 조회 4,867
11년 전 조회 2,734
11년 전 조회 3,572
11년 전 조회 1,932
11년 전 조회 2,989
11년 전 조회 5,632
11년 전 조회 2,740
11년 전 조회 2,981