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

· 11년 전 · 1413


관련파일 : 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,309
11년 전 조회 1,300
11년 전 조회 1,293
11년 전 조회 753
11년 전 조회 1,150
11년 전 조회 1,486
11년 전 조회 1,456
11년 전 조회 824
11년 전 조회 1,175
11년 전 조회 939
11년 전 조회 1,694
11년 전 조회 1,334
11년 전 조회 714
11년 전 조회 2,141
11년 전 조회 6,616
11년 전 조회 1,274
11년 전 조회 1,120
11년 전 조회 1,051
11년 전 조회 911
11년 전 조회 1,447
11년 전 조회 837
11년 전 조회 3,404
11년 전 조회 1,244
11년 전 조회 1,635
11년 전 조회 1,009
11년 전 조회 2,646
11년 전 조회 1,279
11년 전 조회 2,567
11년 전 조회 1,930
11년 전 조회 2,442
11년 전 조회 1,391
11년 전 조회 2,522
11년 전 조회 1,337
11년 전 조회 1,026
11년 전 조회 1,032
11년 전 조회 5,413
11년 전 조회 1,217
11년 전 조회 781
11년 전 조회 749
11년 전 조회 1,106
11년 전 조회 1,451
11년 전 조회 1,866
11년 전 조회 2,177
11년 전 조회 1,082
11년 전 조회 1,406
11년 전 조회 1,347
11년 전 조회 985
11년 전 조회 746
11년 전 조회 2,170
11년 전 조회 1,414
11년 전 조회 3,248
11년 전 조회 1,150
11년 전 조회 1,010
11년 전 조회 2,093
11년 전 조회 2,747
11년 전 조회 2,108
11년 전 조회 3,141
11년 전 조회 1,529
11년 전 조회 3,272
11년 전 조회 788
11년 전 조회 1,091
11년 전 조회 1,960
11년 전 조회 2,307
11년 전 조회 1,011
11년 전 조회 2,825
11년 전 조회 3,021
11년 전 조회 1,528
11년 전 조회 2,199
11년 전 조회 1,048
11년 전 조회 1,401
11년 전 조회 1,077
11년 전 조회 2,271
11년 전 조회 2,190
11년 전 조회 1,170
11년 전 조회 5,301
11년 전 조회 2,347
11년 전 조회 3,066
11년 전 조회 1,914
11년 전 조회 957
11년 전 조회 2,030
11년 전 조회 2,163
11년 전 조회 1,875
11년 전 조회 1,486
11년 전 조회 952
11년 전 조회 1,844
11년 전 조회 2,570
11년 전 조회 1,294
11년 전 조회 2,783
11년 전 조회 1,728
11년 전 조회 4,480
11년 전 조회 1,850
11년 전 조회 2,504
11년 전 조회 3,722
11년 전 조회 1,593
11년 전 조회 2,455
11년 전 조회 822
11년 전 조회 1,851
11년 전 조회 4,486
11년 전 조회 1,609
11년 전 조회 1,866
🐛 버그신고