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

· 11년 전 · 1404


관련파일 : 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,294
11년 전 조회 1,282
11년 전 조회 1,275
11년 전 조회 738
11년 전 조회 1,136
11년 전 조회 1,479
11년 전 조회 1,439
11년 전 조회 813
11년 전 조회 1,157
11년 전 조회 925
11년 전 조회 1,681
11년 전 조회 1,321
11년 전 조회 697
11년 전 조회 2,133
11년 전 조회 6,599
11년 전 조회 1,263
11년 전 조회 1,109
11년 전 조회 1,041
11년 전 조회 896
11년 전 조회 1,428
11년 전 조회 827
11년 전 조회 3,385
11년 전 조회 1,232
11년 전 조회 1,624
11년 전 조회 997
11년 전 조회 2,629
11년 전 조회 1,266
11년 전 조회 2,553
11년 전 조회 1,919
11년 전 조회 2,429
11년 전 조회 1,375
11년 전 조회 2,509
11년 전 조회 1,319
11년 전 조회 1,012
11년 전 조회 1,024
11년 전 조회 5,405
11년 전 조회 1,201
11년 전 조회 764
11년 전 조회 740
11년 전 조회 1,089
11년 전 조회 1,436
11년 전 조회 1,853
11년 전 조회 2,161
11년 전 조회 1,069
11년 전 조회 1,389
11년 전 조회 1,334
11년 전 조회 975
11년 전 조회 732
11년 전 조회 2,160
11년 전 조회 1,405
11년 전 조회 3,234
11년 전 조회 1,139
11년 전 조회 996
11년 전 조회 2,078
11년 전 조회 2,732
11년 전 조회 2,094
11년 전 조회 3,126
11년 전 조회 1,512
11년 전 조회 3,261
11년 전 조회 775
11년 전 조회 1,074
11년 전 조회 1,950
11년 전 조회 2,301
11년 전 조회 1,005
11년 전 조회 2,816
11년 전 조회 3,018
11년 전 조회 1,509
11년 전 조회 2,184
11년 전 조회 1,038
11년 전 조회 1,390
11년 전 조회 1,064
11년 전 조회 2,258
11년 전 조회 2,173
11년 전 조회 1,158
11년 전 조회 5,291
11년 전 조회 2,341
11년 전 조회 3,053
11년 전 조회 1,901
11년 전 조회 942
11년 전 조회 2,023
11년 전 조회 2,152
11년 전 조회 1,870
11년 전 조회 1,480
11년 전 조회 936
11년 전 조회 1,836
11년 전 조회 2,558
11년 전 조회 1,285
11년 전 조회 2,768
11년 전 조회 1,713
11년 전 조회 4,468
11년 전 조회 1,840
11년 전 조회 2,495
11년 전 조회 3,709
11년 전 조회 1,577
11년 전 조회 2,451
11년 전 조회 802
11년 전 조회 1,836
11년 전 조회 4,472
11년 전 조회 1,596
11년 전 조회 1,855
🐛 버그신고