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

· 11년 전 · 1402


관련파일 : 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,291
11년 전 조회 1,282
11년 전 조회 1,274
11년 전 조회 737
11년 전 조회 1,135
11년 전 조회 1,478
11년 전 조회 1,437
11년 전 조회 813
11년 전 조회 1,157
11년 전 조회 922
11년 전 조회 1,679
11년 전 조회 1,318
11년 전 조회 696
11년 전 조회 2,131
11년 전 조회 6,597
11년 전 조회 1,263
11년 전 조회 1,105
11년 전 조회 1,041
11년 전 조회 893
11년 전 조회 1,427
11년 전 조회 827
11년 전 조회 3,385
11년 전 조회 1,228
11년 전 조회 1,623
11년 전 조회 995
11년 전 조회 2,628
11년 전 조회 1,266
11년 전 조회 2,551
11년 전 조회 1,918
11년 전 조회 2,427
11년 전 조회 1,374
11년 전 조회 2,508
11년 전 조회 1,319
11년 전 조회 1,011
11년 전 조회 1,023
11년 전 조회 5,403
11년 전 조회 1,199
11년 전 조회 763
11년 전 조회 740
11년 전 조회 1,089
11년 전 조회 1,434
11년 전 조회 1,851
11년 전 조회 2,159
11년 전 조회 1,067
11년 전 조회 1,389
11년 전 조회 1,331
11년 전 조회 975
11년 전 조회 730
11년 전 조회 2,158
11년 전 조회 1,403
11년 전 조회 3,234
11년 전 조회 1,137
11년 전 조회 994
11년 전 조회 2,078
11년 전 조회 2,731
11년 전 조회 2,093
11년 전 조회 3,126
11년 전 조회 1,512
11년 전 조회 3,259
11년 전 조회 775
11년 전 조회 1,073
11년 전 조회 1,949
11년 전 조회 2,300
11년 전 조회 1,005
11년 전 조회 2,816
11년 전 조회 3,017
11년 전 조회 1,508
11년 전 조회 2,183
11년 전 조회 1,037
11년 전 조회 1,389
11년 전 조회 1,062
11년 전 조회 2,257
11년 전 조회 2,172
11년 전 조회 1,158
11년 전 조회 5,290
11년 전 조회 2,341
11년 전 조회 3,053
11년 전 조회 1,901
11년 전 조회 941
11년 전 조회 2,023
11년 전 조회 2,151
11년 전 조회 1,870
11년 전 조회 1,480
11년 전 조회 935
11년 전 조회 1,835
11년 전 조회 2,557
11년 전 조회 1,285
11년 전 조회 2,767
11년 전 조회 1,713
11년 전 조회 4,466
11년 전 조회 1,839
11년 전 조회 2,495
11년 전 조회 3,709
11년 전 조회 1,577
11년 전 조회 2,451
11년 전 조회 802
11년 전 조회 1,836
11년 전 조회 4,469
11년 전 조회 1,593
11년 전 조회 1,853
🐛 버그신고