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

· 11년 전 · 1427


관련파일 : 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,319
11년 전 조회 1,311
11년 전 조회 1,304
11년 전 조회 762
11년 전 조회 1,165
11년 전 조회 1,497
11년 전 조회 1,464
11년 전 조회 832
11년 전 조회 1,184
11년 전 조회 950
11년 전 조회 1,705
11년 전 조회 1,346
11년 전 조회 723
11년 전 조회 2,151
11년 전 조회 6,623
11년 전 조회 1,282
11년 전 조회 1,128
11년 전 조회 1,059
11년 전 조회 922
11년 전 조회 1,454
11년 전 조회 850
11년 전 조회 3,414
11년 전 조회 1,253
11년 전 조회 1,648
11년 전 조회 1,022
11년 전 조회 2,662
11년 전 조회 1,294
11년 전 조회 2,582
11년 전 조회 1,942
11년 전 조회 2,457
11년 전 조회 1,402
11년 전 조회 2,534
11년 전 조회 1,352
11년 전 조회 1,038
11년 전 조회 1,042
11년 전 조회 5,421
11년 전 조회 1,230
11년 전 조회 793
11년 전 조회 756
11년 전 조회 1,117
11년 전 조회 1,460
11년 전 조회 1,878
11년 전 조회 2,188
11년 전 조회 1,093
11년 전 조회 1,417
11년 전 조회 1,357
11년 전 조회 1,000
11년 전 조회 756
11년 전 조회 2,183
11년 전 조회 1,428
11년 전 조회 3,262
11년 전 조회 1,163
11년 전 조회 1,019
11년 전 조회 2,101
11년 전 조회 2,758
11년 전 조회 2,117
11년 전 조회 3,152
11년 전 조회 1,543
11년 전 조회 3,283
11년 전 조회 803
11년 전 조회 1,102
11년 전 조회 1,976
11년 전 조회 2,315
11년 전 조회 1,013
11년 전 조회 2,836
11년 전 조회 3,026
11년 전 조회 1,535
11년 전 조회 2,212
11년 전 조회 1,059
11년 전 조회 1,412
11년 전 조회 1,089
11년 전 조회 2,283
11년 전 조회 2,196
11년 전 조회 1,177
11년 전 조회 5,312
11년 전 조회 2,357
11년 전 조회 3,072
11년 전 조회 1,921
11년 전 조회 967
11년 전 조회 2,038
11년 전 조회 2,171
11년 전 조회 1,882
11년 전 조회 1,493
11년 전 조회 960
11년 전 조회 1,855
11년 전 조회 2,577
11년 전 조회 1,308
11년 전 조회 2,791
11년 전 조회 1,738
11년 전 조회 4,491
11년 전 조회 1,859
11년 전 조회 2,512
11년 전 조회 3,735
11년 전 조회 1,603
11년 전 조회 2,464
11년 전 조회 831
11년 전 조회 1,861
11년 전 조회 4,497
11년 전 조회 1,619
11년 전 조회 1,879
🐛 버그신고