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

· 11년 전 · 2816


관련파일 : 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,719
11년 전 조회 2,729
11년 전 조회 2,701
11년 전 조회 2,165
11년 전 조회 2,560
11년 전 조회 2,912
11년 전 조회 2,855
11년 전 조회 2,197
11년 전 조회 2,566
11년 전 조회 2,344
11년 전 조회 3,071
11년 전 조회 2,717
11년 전 조회 2,074
11년 전 조회 3,479
11년 전 조회 7,988
11년 전 조회 2,616
11년 전 조회 2,500
11년 전 조회 2,370
11년 전 조회 2,252
11년 전 조회 2,810
11년 전 조회 2,193
11년 전 조회 4,766
11년 전 조회 2,606
11년 전 조회 2,992
11년 전 조회 2,341
11년 전 조회 3,892
11년 전 조회 2,655
11년 전 조회 4,004
11년 전 조회 3,333
11년 전 조회 3,823
11년 전 조회 2,829
11년 전 조회 3,928
11년 전 조회 2,741
11년 전 조회 2,444
11년 전 조회 2,420
11년 전 조회 6,813
11년 전 조회 2,624
11년 전 조회 2,174
11년 전 조회 2,132
11년 전 조회 2,503
11년 전 조회 2,861
11년 전 조회 3,306
11년 전 조회 3,598
11년 전 조회 2,534
11년 전 조회 2,795
11년 전 조회 2,761
11년 전 조회 2,359
11년 전 조회 2,177
11년 전 조회 3,554
11년 전 조회 2,817
11년 전 조회 4,643
11년 전 조회 2,563
11년 전 조회 2,451
11년 전 조회 3,500
11년 전 조회 4,171
11년 전 조회 3,515
11년 전 조회 4,556
11년 전 조회 2,933
11년 전 조회 4,687
11년 전 조회 2,216
11년 전 조회 2,506
11년 전 조회 3,345
11년 전 조회 3,703
11년 전 조회 2,301
11년 전 조회 4,238
11년 전 조회 4,414
11년 전 조회 2,941
11년 전 조회 3,634
11년 전 조회 2,489
11년 전 조회 2,805
11년 전 조회 2,502
11년 전 조회 3,727
11년 전 조회 3,594
11년 전 조회 2,635
11년 전 조회 6,725
11년 전 조회 3,810
11년 전 조회 4,518
11년 전 조회 3,364
11년 전 조회 2,395
11년 전 조회 3,476
11년 전 조회 3,610
11년 전 조회 3,300
11년 전 조회 2,929
11년 전 조회 2,397
11년 전 조회 3,274
11년 전 조회 4,023
11년 전 조회 2,726
11년 전 조회 4,245
11년 전 조회 3,192
11년 전 조회 6,028
11년 전 조회 3,271
11년 전 조회 3,946
11년 전 조회 5,175
11년 전 조회 3,067
11년 전 조회 3,900
11년 전 조회 2,252
11년 전 조회 3,301
11년 전 조회 5,958
11년 전 조회 3,102
11년 전 조회 3,298