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

· 11년 전 · 1486


관련파일 : 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,383
11년 전 조회 1,372
11년 전 조회 1,373
11년 전 조회 830
11년 전 조회 1,233
11년 전 조회 1,564
11년 전 조회 1,533
11년 전 조회 905
11년 전 조회 1,247
11년 전 조회 1,011
11년 전 조회 1,765
11년 전 조회 1,407
11년 전 조회 790
11년 전 조회 2,216
11년 전 조회 6,687
11년 전 조회 1,346
11년 전 조회 1,190
11년 전 조회 1,128
11년 전 조회 980
11년 전 조회 1,514
11년 전 조회 909
11년 전 조회 3,481
11년 전 조회 1,318
11년 전 조회 1,719
11년 전 조회 1,087
11년 전 조회 2,721
11년 전 조회 1,370
11년 전 조회 2,642
11년 전 조회 2,013
11년 전 조회 2,519
11년 전 조회 1,472
11년 전 조회 2,607
11년 전 조회 1,405
11년 전 조회 1,110
11년 전 조회 1,113
11년 전 조회 5,481
11년 전 조회 1,289
11년 전 조회 855
11년 전 조회 818
11년 전 조회 1,168
11년 전 조회 1,525
11년 전 조회 1,939
11년 전 조회 2,251
11년 전 조회 1,158
11년 전 조회 1,477
11년 전 조회 1,416
11년 전 조회 1,065
11년 전 조회 821
11년 전 조회 2,253
11년 전 조회 1,486
11년 전 조회 3,330
11년 전 조회 1,224
11년 전 조회 1,057
11년 전 조회 2,160
11년 전 조회 2,810
11년 전 조회 2,180
11년 전 조회 3,211
11년 전 조회 1,594
11년 전 조회 3,345
11년 전 조회 857
11년 전 조회 1,151
11년 전 조회 2,046
11년 전 조회 2,377
11년 전 조회 1,064
11년 전 조회 2,888
11년 전 조회 3,085
11년 전 조회 1,602
11년 전 조회 2,268
11년 전 조회 1,120
11년 전 조회 1,465
11년 전 조회 1,140
11년 전 조회 2,338
11년 전 조회 2,246
11년 전 조회 1,244
11년 전 조회 5,368
11년 전 조회 2,413
11년 전 조회 3,136
11년 전 조회 1,984
11년 전 조회 1,026
11년 전 조회 2,094
11년 전 조회 2,232
11년 전 조회 1,944
11년 전 조회 1,549
11년 전 조회 1,024
11년 전 조회 1,907
11년 전 조회 2,636
11년 전 조회 1,364
11년 전 조회 2,851
11년 전 조회 1,800
11년 전 조회 4,550
11년 전 조회 1,917
11년 전 조회 2,567
11년 전 조회 3,788
11년 전 조회 1,649
11년 전 조회 2,521
11년 전 조회 881
11년 전 조회 1,917
11년 전 조회 4,552
11년 전 조회 1,680
11년 전 조회 1,936
🐛 버그신고