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

· 11년 전 · 2122


관련파일 : 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,032
11년 전 조회 2,019
11년 전 조회 2,014
11년 전 조회 1,486
11년 전 조회 1,890
11년 전 조회 2,204
11년 전 조회 2,158
11년 전 조회 1,488
11년 전 조회 1,895
11년 전 조회 1,677
11년 전 조회 2,404
11년 전 조회 2,033
11년 전 조회 1,420
11년 전 조회 2,788
11년 전 조회 7,289
11년 전 조회 1,931
11년 전 조회 1,822
11년 전 조회 1,685
11년 전 조회 1,598
11년 전 조회 2,107
11년 전 조회 1,501
11년 전 조회 4,082
11년 전 조회 1,919
11년 전 조회 2,312
11년 전 조회 1,694
11년 전 조회 3,256
11년 전 조회 2,012
11년 전 조회 3,261
11년 전 조회 2,668
11년 전 조회 3,147
11년 전 조회 2,129
11년 전 조회 3,234
11년 전 조회 2,069
11년 전 조회 1,773
11년 전 조회 1,726
11년 전 조회 6,097
11년 전 조회 1,935
11년 전 조회 1,480
11년 전 조회 1,427
11년 전 조회 1,816
11년 전 조회 2,156
11년 전 조회 2,589
11년 전 조회 2,909
11년 전 조회 1,794
11년 전 조회 2,105
11년 전 조회 2,033
11년 전 조회 1,671
11년 전 조회 1,438
11년 전 조회 2,859
11년 전 조회 2,123
11년 전 조회 3,931
11년 전 조회 1,870
11년 전 조회 1,710
11년 전 조회 2,785
11년 전 조회 3,447
11년 전 조회 2,798
11년 전 조회 3,834
11년 전 조회 2,247
11년 전 조회 4,019
11년 전 조회 1,516
11년 전 조회 1,804
11년 전 조회 2,642
11년 전 조회 3,005
11년 전 조회 1,631
11년 전 조회 3,519
11년 전 조회 3,677
11년 전 조회 2,259
11년 전 조회 2,925
11년 전 조회 1,734
11년 전 조회 2,091
11년 전 조회 1,810
11년 전 조회 3,019
11년 전 조회 2,884
11년 전 조회 1,861
11년 전 조회 6,037
11년 전 조회 3,216
11년 전 조회 3,864
11년 전 조회 2,706
11년 전 조회 1,659
11년 전 조회 2,734
11년 전 조회 2,920
11년 전 조회 2,568
11년 전 조회 2,186
11년 전 조회 1,659
11년 전 조회 2,572
11년 전 조회 3,347
11년 전 조회 2,003
11년 전 조회 3,527
11년 전 조회 2,490
11년 전 조회 5,270
11년 전 조회 2,557
11년 전 조회 3,223
11년 전 조회 4,464
11년 전 조회 2,326
11년 전 조회 3,173
11년 전 조회 1,564
11년 전 조회 2,606
11년 전 조회 5,254
11년 전 조회 2,356
11년 전 조회 2,582