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

· 11년 전 · 1406


관련파일 : 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,300
11년 전 조회 1,290
11년 전 조회 1,281
11년 전 조회 744
11년 전 조회 1,144
11년 전 조회 1,483
11년 전 조회 1,449
11년 전 조회 817
11년 전 조회 1,165
11년 전 조회 932
11년 전 조회 1,686
11년 전 조회 1,329
11년 전 조회 703
11년 전 조회 2,137
11년 전 조회 6,608
11년 전 조회 1,270
11년 전 조회 1,118
11년 전 조회 1,047
11년 전 조회 901
11년 전 조회 1,436
11년 전 조회 831
11년 전 조회 3,393
11년 전 조회 1,238
11년 전 조회 1,629
11년 전 조회 1,004
11년 전 조회 2,640
11년 전 조회 1,269
11년 전 조회 2,557
11년 전 조회 1,921
11년 전 조회 2,432
11년 전 조회 1,387
11년 전 조회 2,515
11년 전 조회 1,327
11년 전 조회 1,022
11년 전 조회 1,029
11년 전 조회 5,409
11년 전 조회 1,207
11년 전 조회 772
11년 전 조회 744
11년 전 조회 1,097
11년 전 조회 1,442
11년 전 조회 1,860
11년 전 조회 2,169
11년 전 조회 1,073
11년 전 조회 1,396
11년 전 조회 1,342
11년 전 조회 981
11년 전 조회 735
11년 전 조회 2,163
11년 전 조회 1,407
11년 전 조회 3,243
11년 전 조회 1,144
11년 전 조회 1,001
11년 전 조회 2,085
11년 전 조회 2,739
11년 전 조회 2,098
11년 전 조회 3,133
11년 전 조회 1,522
11년 전 조회 3,266
11년 전 조회 783
11년 전 조회 1,081
11년 전 조회 1,952
11년 전 조회 2,304
11년 전 조회 1,007
11년 전 조회 2,820
11년 전 조회 3,018
11년 전 조회 1,518
11년 전 조회 2,194
11년 전 조회 1,045
11년 전 조회 1,393
11년 전 조회 1,070
11년 전 조회 2,266
11년 전 조회 2,182
11년 전 조회 1,163
11년 전 조회 5,292
11년 전 조회 2,343
11년 전 조회 3,059
11년 전 조회 1,909
11년 전 조회 949
11년 전 조회 2,024
11년 전 조회 2,157
11년 전 조회 1,872
11년 전 조회 1,483
11년 전 조회 945
11년 전 조회 1,837
11년 전 조회 2,564
11년 전 조회 1,288
11년 전 조회 2,775
11년 전 조회 1,719
11년 전 조회 4,472
11년 전 조회 1,844
11년 전 조회 2,499
11년 전 조회 3,713
11년 전 조회 1,586
11년 전 조회 2,454
11년 전 조회 815
11년 전 조회 1,843
11년 전 조회 4,476
11년 전 조회 1,601
11년 전 조회 1,858
🐛 버그신고