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

· 11년 전 · 1414


관련파일 : 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,294
11년 전 조회 753
11년 전 조회 1,151
11년 전 조회 1,486
11년 전 조회 1,456
11년 전 조회 824
11년 전 조회 1,176
11년 전 조회 940
11년 전 조회 1,694
11년 전 조회 1,334
11년 전 조회 714
11년 전 조회 2,141
11년 전 조회 6,617
11년 전 조회 1,274
11년 전 조회 1,121
11년 전 조회 1,051
11년 전 조회 911
11년 전 조회 1,448
11년 전 조회 838
11년 전 조회 3,405
11년 전 조회 1,244
11년 전 조회 1,635
11년 전 조회 1,009
11년 전 조회 2,647
11년 전 조회 1,281
11년 전 조회 2,567
11년 전 조회 1,931
11년 전 조회 2,442
11년 전 조회 1,392
11년 전 조회 2,522
11년 전 조회 1,338
11년 전 조회 1,027
11년 전 조회 1,032
11년 전 조회 5,413
11년 전 조회 1,218
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,415
11년 전 조회 3,249
11년 전 조회 1,150
11년 전 조회 1,010
11년 전 조회 2,093
11년 전 조회 2,749
11년 전 조회 2,108
11년 전 조회 3,141
11년 전 조회 1,530
11년 전 조회 3,272
11년 전 조회 788
11년 전 조회 1,091
11년 전 조회 1,961
11년 전 조회 2,307
11년 전 조회 1,011
11년 전 조회 2,825
11년 전 조회 3,021
11년 전 조회 1,528
11년 전 조회 2,200
11년 전 조회 1,048
11년 전 조회 1,402
11년 전 조회 1,077
11년 전 조회 2,271
11년 전 조회 2,190
11년 전 조회 1,170
11년 전 조회 5,302
11년 전 조회 2,348
11년 전 조회 3,066
11년 전 조회 1,914
11년 전 조회 957
11년 전 조회 2,030
11년 전 조회 2,163
11년 전 조회 1,875
11년 전 조회 1,486
11년 전 조회 953
11년 전 조회 1,844
11년 전 조회 2,570
11년 전 조회 1,295
11년 전 조회 2,783
11년 전 조회 1,728
11년 전 조회 4,480
11년 전 조회 1,851
11년 전 조회 2,504
11년 전 조회 3,722
11년 전 조회 1,593
11년 전 조회 2,455
11년 전 조회 822
11년 전 조회 1,851
11년 전 조회 4,487
11년 전 조회 1,611
11년 전 조회 1,867
🐛 버그신고