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

· 11년 전 · 1536


관련파일 : 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,429
11년 전 조회 1,429
11년 전 조회 1,422
11년 전 조회 875
11년 전 조회 1,277
11년 전 조회 1,610
11년 전 조회 1,570
11년 전 조회 938
11년 전 조회 1,286
11년 전 조회 1,060
11년 전 조회 1,817
11년 전 조회 1,457
11년 전 조회 841
11년 전 조회 2,270
11년 전 조회 6,730
11년 전 조회 1,390
11년 전 조회 1,242
11년 전 조회 1,176
11년 전 조회 1,035
11년 전 조회 1,569
11년 전 조회 953
11년 전 조회 3,526
11년 전 조회 1,366
11년 전 조회 1,770
11년 전 조회 1,136
11년 전 조회 2,770
11년 전 조회 1,408
11년 전 조회 2,689
11년 전 조회 2,057
11년 전 조회 2,572
11년 전 조회 1,521
11년 전 조회 2,650
11년 전 조회 1,452
11년 전 조회 1,150
11년 전 조회 1,153
11년 전 조회 5,535
11년 전 조회 1,357
11년 전 조회 901
11년 전 조회 866
11년 전 조회 1,231
11년 전 조회 1,571
11년 전 조회 1,999
11년 전 조회 2,300
11년 전 조회 1,214
11년 전 조회 1,522
11년 전 조회 1,466
11년 전 조회 1,111
11년 전 조회 875
11년 전 조회 2,295
11년 전 조회 1,537
11년 전 조회 3,368
11년 전 조회 1,283
11년 전 조회 1,117
11년 전 조회 2,221
11년 전 조회 2,865
11년 전 조회 2,225
11년 전 조회 3,271
11년 전 조회 1,652
11년 전 조회 3,395
11년 전 조회 913
11년 전 조회 1,203
11년 전 조회 2,089
11년 전 조회 2,425
11년 전 조회 1,099
11년 전 조회 2,935
11년 전 조회 3,118
11년 전 조회 1,653
11년 전 조회 2,314
11년 전 조회 1,177
11년 전 조회 1,513
11년 전 조회 1,192
11년 전 조회 2,392
11년 전 조회 2,303
11년 전 조회 1,286
11년 전 조회 5,422
11년 전 조회 2,464
11년 전 조회 3,180
11년 전 조회 2,029
11년 전 조회 1,074
11년 전 조회 2,140
11년 전 조회 2,279
11년 전 조회 1,988
11년 전 조회 1,596
11년 전 조회 1,082
11년 전 조회 1,960
11년 전 조회 2,688
11년 전 조회 1,412
11년 전 조회 2,905
11년 전 조회 1,855
11년 전 조회 4,605
11년 전 조회 1,967
11년 전 조회 2,624
11년 전 조회 3,841
11년 전 조회 1,711
11년 전 조회 2,567
11년 전 조회 937
11년 전 조회 1,965
11년 전 조회 4,595
11년 전 조회 1,728
11년 전 조회 1,991
🐛 버그신고