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

· 11년 전 · 1429


관련파일 : 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,321
11년 전 조회 1,312
11년 전 조회 1,305
11년 전 조회 762
11년 전 조회 1,165
11년 전 조회 1,499
11년 전 조회 1,464
11년 전 조회 835
11년 전 조회 1,184
11년 전 조회 952
11년 전 조회 1,706
11년 전 조회 1,347
11년 전 조회 725
11년 전 조회 2,151
11년 전 조회 6,624
11년 전 조회 1,282
11년 전 조회 1,131
11년 전 조회 1,060
11년 전 조회 923
11년 전 조회 1,455
11년 전 조회 851
11년 전 조회 3,415
11년 전 조회 1,255
11년 전 조회 1,649
11년 전 조회 1,023
11년 전 조회 2,662
11년 전 조회 1,295
11년 전 조회 2,582
11년 전 조회 1,943
11년 전 조회 2,458
11년 전 조회 1,403
11년 전 조회 2,534
11년 전 조회 1,352
11년 전 조회 1,039
11년 전 조회 1,042
11년 전 조회 5,421
11년 전 조회 1,231
11년 전 조회 794
11년 전 조회 756
11년 전 조회 1,117
11년 전 조회 1,461
11년 전 조회 1,878
11년 전 조회 2,189
11년 전 조회 1,094
11년 전 조회 1,419
11년 전 조회 1,358
11년 전 조회 1,001
11년 전 조회 757
11년 전 조회 2,184
11년 전 조회 1,430
11년 전 조회 3,263
11년 전 조회 1,164
11년 전 조회 1,019
11년 전 조회 2,103
11년 전 조회 2,758
11년 전 조회 2,118
11년 전 조회 3,152
11년 전 조회 1,543
11년 전 조회 3,283
11년 전 조회 804
11년 전 조회 1,102
11년 전 조회 1,976
11년 전 조회 2,315
11년 전 조회 1,013
11년 전 조회 2,837
11년 전 조회 3,027
11년 전 조회 1,536
11년 전 조회 2,213
11년 전 조회 1,062
11년 전 조회 1,412
11년 전 조회 1,090
11년 전 조회 2,284
11년 전 조회 2,197
11년 전 조회 1,178
11년 전 조회 5,314
11년 전 조회 2,357
11년 전 조회 3,073
11년 전 조회 1,923
11년 전 조회 969
11년 전 조회 2,039
11년 전 조회 2,173
11년 전 조회 1,882
11년 전 조회 1,494
11년 전 조회 963
11년 전 조회 1,858
11년 전 조회 2,578
11년 전 조회 1,309
11년 전 조회 2,791
11년 전 조회 1,738
11년 전 조회 4,492
11년 전 조회 1,861
11년 전 조회 2,513
11년 전 조회 3,737
11년 전 조회 1,604
11년 전 조회 2,464
11년 전 조회 831
11년 전 조회 1,862
11년 전 조회 4,497
11년 전 조회 1,619
11년 전 조회 1,880
🐛 버그신고