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

· 11년 전 · 2736


관련파일 : 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,613
11년 전 조회 2,641
11년 전 조회 2,632
11년 전 조회 2,076
11년 전 조회 2,469
11년 전 조회 2,830
11년 전 조회 2,746
11년 전 조회 2,114
11년 전 조회 2,467
11년 전 조회 2,244
11년 전 조회 2,954
11년 전 조회 2,621
11년 전 조회 1,984
11년 전 조회 3,374
11년 전 조회 7,897
11년 전 조회 2,527
11년 전 조회 2,404
11년 전 조회 2,285
11년 전 조회 2,167
11년 전 조회 2,710
11년 전 조회 2,098
11년 전 조회 4,657
11년 전 조회 2,510
11년 전 조회 2,885
11년 전 조회 2,233
11년 전 조회 3,798
11년 전 조회 2,557
11년 전 조회 3,914
11년 전 조회 3,234
11년 전 조회 3,737
11년 전 조회 2,742
11년 전 조회 3,835
11년 전 조회 2,656
11년 전 조회 2,362
11년 전 조회 2,334
11년 전 조회 6,730
11년 전 조회 2,533
11년 전 조회 2,067
11년 전 조회 2,054
11년 전 조회 2,412
11년 전 조회 2,774
11년 전 조회 3,211
11년 전 조회 3,521
11년 전 조회 2,434
11년 전 조회 2,713
11년 전 조회 2,667
11년 전 조회 2,274
11년 전 조회 2,081
11년 전 조회 3,481
11년 전 조회 2,737
11년 전 조회 4,547
11년 전 조회 2,485
11년 전 조회 2,351
11년 전 조회 3,417
11년 전 조회 4,070
11년 전 조회 3,419
11년 전 조회 4,466
11년 전 조회 2,851
11년 전 조회 4,596
11년 전 조회 2,135
11년 전 조회 2,417
11년 전 조회 3,254
11년 전 조회 3,614
11년 전 조회 2,224
11년 전 조회 4,150
11년 전 조회 4,327
11년 전 조회 2,847
11년 전 조회 3,554
11년 전 조회 2,406
11년 전 조회 2,715
11년 전 조회 2,410
11년 전 조회 3,634
11년 전 조회 3,493
11년 전 조회 2,532
11년 전 조회 6,637
11년 전 조회 3,721
11년 전 조회 4,423
11년 전 조회 3,269
11년 전 조회 2,311
11년 전 조회 3,391
11년 전 조회 3,522
11년 전 조회 3,209
11년 전 조회 2,827
11년 전 조회 2,305
11년 전 조회 3,187
11년 전 조회 3,941
11년 전 조회 2,637
11년 전 조회 4,158
11년 전 조회 3,100
11년 전 조회 5,929
11년 전 조회 3,183
11년 전 조회 3,884
11년 전 조회 5,074
11년 전 조회 2,977
11년 전 조회 3,807
11년 전 조회 2,172
11년 전 조회 3,208
11년 전 조회 5,868
11년 전 조회 3,014
11년 전 조회 3,222