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

· 11년 전 · 1421


관련파일 : 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,312
11년 전 조회 1,307
11년 전 조회 1,299
11년 전 조회 757
11년 전 조회 1,158
11년 전 조회 1,492
11년 전 조회 1,462
11년 전 조회 828
11년 전 조회 1,180
11년 전 조회 945
11년 전 조회 1,701
11년 전 조회 1,341
11년 전 조회 717
11년 전 조회 2,146
11년 전 조회 6,618
11년 전 조회 1,280
11년 전 조회 1,124
11년 전 조회 1,054
11년 전 조회 917
11년 전 조회 1,452
11년 전 조회 844
11년 전 조회 3,409
11년 전 조회 1,248
11년 전 조회 1,642
11년 전 조회 1,010
11년 전 조회 2,653
11년 전 조회 1,286
11년 전 조회 2,577
11년 전 조회 1,938
11년 전 조회 2,451
11년 전 조회 1,398
11년 전 조회 2,531
11년 전 조회 1,346
11년 전 조회 1,031
11년 전 조회 1,037
11년 전 조회 5,418
11년 전 조회 1,222
11년 전 조회 785
11년 전 조회 752
11년 전 조회 1,111
11년 전 조회 1,453
11년 전 조회 1,870
11년 전 조회 2,181
11년 전 조회 1,084
11년 전 조회 1,408
11년 전 조회 1,351
11년 전 조회 993
11년 전 조회 747
11년 전 조회 2,177
11년 전 조회 1,422
11년 전 조회 3,255
11년 전 조회 1,156
11년 전 조회 1,015
11년 전 조회 2,098
11년 전 조회 2,753
11년 전 조회 2,113
11년 전 조회 3,146
11년 전 조회 1,535
11년 전 조회 3,278
11년 전 조회 791
11년 전 조회 1,095
11년 전 조회 1,970
11년 전 조회 2,310
11년 전 조회 1,011
11년 전 조회 2,830
11년 전 조회 3,024
11년 전 조회 1,533
11년 전 조회 2,202
11년 전 조회 1,051
11년 전 조회 1,405
11년 전 조회 1,082
11년 전 조회 2,275
11년 전 조회 2,191
11년 전 조회 1,174
11년 전 조회 5,309
11년 전 조회 2,353
11년 전 조회 3,069
11년 전 조회 1,917
11년 전 조회 961
11년 전 조회 2,034
11년 전 조회 2,169
11년 전 조회 1,878
11년 전 조회 1,489
11년 전 조회 959
11년 전 조회 1,852
11년 전 조회 2,573
11년 전 조회 1,299
11년 전 조회 2,788
11년 전 조회 1,732
11년 전 조회 4,485
11년 전 조회 1,855
11년 전 조회 2,510
11년 전 조회 3,729
11년 전 조회 1,599
11년 전 조회 2,459
11년 전 조회 827
11년 전 조회 1,858
11년 전 조회 4,489
11년 전 조회 1,614
11년 전 조회 1,872
🐛 버그신고