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

· 11년 전 · 2772


관련파일 : 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년 전 조회 2,644
11년 전 조회 2,670
11년 전 조회 2,660
11년 전 조회 2,110
11년 전 조회 2,492
11년 전 조회 2,858
11년 전 조회 2,776
11년 전 조회 2,143
11년 전 조회 2,495
11년 전 조회 2,280
11년 전 조회 2,993
11년 전 조회 2,655
11년 전 조회 2,016
11년 전 조회 3,402
11년 전 조회 7,926
11년 전 조회 2,550
11년 전 조회 2,434
11년 전 조회 2,321
11년 전 조회 2,190
11년 전 조회 2,738
11년 전 조회 2,137
11년 전 조회 4,696
11년 전 조회 2,542
11년 전 조회 2,919
11년 전 조회 2,270
11년 전 조회 3,825
11년 전 조회 2,590
11년 전 조회 3,943
11년 전 조회 3,266
11년 전 조회 3,759
11년 전 조회 2,769
11년 전 조회 3,861
11년 전 조회 2,678
11년 전 조회 2,387
11년 전 조회 2,364
11년 전 조회 6,754
11년 전 조회 2,561
11년 전 조회 2,097
11년 전 조회 2,086
11년 전 조회 2,440
11년 전 조회 2,809
11년 전 조회 3,238
11년 전 조회 3,550
11년 전 조회 2,466
11년 전 조회 2,737
11년 전 조회 2,699
11년 전 조회 2,302
11년 전 조회 2,119
11년 전 조회 3,508
11년 전 조회 2,773
11년 전 조회 4,582
11년 전 조회 2,513
11년 전 조회 2,383
11년 전 조회 3,444
11년 전 조회 4,101
11년 전 조회 3,452
11년 전 조회 4,492
11년 전 조회 2,879
11년 전 조회 4,625
11년 전 조회 2,163
11년 전 조회 2,451
11년 전 조회 3,275
11년 전 조회 3,648
11년 전 조회 2,253
11년 전 조회 4,179
11년 전 조회 4,360
11년 전 조회 2,880
11년 전 조회 3,578
11년 전 조회 2,431
11년 전 조회 2,746
11년 전 조회 2,438
11년 전 조회 3,668
11년 전 조회 3,522
11년 전 조회 2,569
11년 전 조회 6,668
11년 전 조회 3,760
11년 전 조회 4,451
11년 전 조회 3,297
11년 전 조회 2,335
11년 전 조회 3,410
11년 전 조회 3,541
11년 전 조회 3,232
11년 전 조회 2,865
11년 전 조회 2,336
11년 전 조회 3,215
11년 전 조회 3,962
11년 전 조회 2,660
11년 전 조회 4,178
11년 전 조회 3,131
11년 전 조회 5,959
11년 전 조회 3,209
11년 전 조회 3,900
11년 전 조회 5,101
11년 전 조회 3,013
11년 전 조회 3,848
11년 전 조회 2,202
11년 전 조회 3,241
11년 전 조회 5,897
11년 전 조회 3,053
11년 전 조회 3,249