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

· 11년 전 · 2777


관련파일 : 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,652
11년 전 조회 2,679
11년 전 조회 2,664
11년 전 조회 2,114
11년 전 조회 2,502
11년 전 조회 2,861
11년 전 조회 2,784
11년 전 조회 2,150
11년 전 조회 2,507
11년 전 조회 2,286
11년 전 조회 3,004
11년 전 조회 2,665
11년 전 조회 2,026
11년 전 조회 3,412
11년 전 조회 7,936
11년 전 조회 2,555
11년 전 조회 2,441
11년 전 조회 2,329
11년 전 조회 2,200
11년 전 조회 2,747
11년 전 조회 2,143
11년 전 조회 4,702
11년 전 조회 2,546
11년 전 조회 2,927
11년 전 조회 2,277
11년 전 조회 3,830
11년 전 조회 2,595
11년 전 조회 3,946
11년 전 조회 3,274
11년 전 조회 3,765
11년 전 조회 2,774
11년 전 조회 3,865
11년 전 조회 2,686
11년 전 조회 2,391
11년 전 조회 2,369
11년 전 조회 6,758
11년 전 조회 2,565
11년 전 조회 2,106
11년 전 조회 2,091
11년 전 조회 2,447
11년 전 조회 2,815
11년 전 조회 3,247
11년 전 조회 3,557
11년 전 조회 2,475
11년 전 조회 2,744
11년 전 조회 2,710
11년 전 조회 2,313
11년 전 조회 2,124
11년 전 조회 3,511
11년 전 조회 2,778
11년 전 조회 4,589
11년 전 조회 2,518
11년 전 조회 2,393
11년 전 조회 3,446
11년 전 조회 4,106
11년 전 조회 3,460
11년 전 조회 4,496
11년 전 조회 2,886
11년 전 조회 4,630
11년 전 조회 2,168
11년 전 조회 2,458
11년 전 조회 3,284
11년 전 조회 3,655
11년 전 조회 2,254
11년 전 조회 4,184
11년 전 조회 4,364
11년 전 조회 2,885
11년 전 조회 3,583
11년 전 조회 2,444
11년 전 조회 2,753
11년 전 조회 2,448
11년 전 조회 3,671
11년 전 조회 3,531
11년 전 조회 2,584
11년 전 조회 6,675
11년 전 조회 3,766
11년 전 조회 4,462
11년 전 조회 3,304
11년 전 조회 2,345
11년 전 조회 3,415
11년 전 조회 3,547
11년 전 조회 3,237
11년 전 조회 2,873
11년 전 조회 2,347
11년 전 조회 3,223
11년 전 조회 3,967
11년 전 조회 2,667
11년 전 조회 4,186
11년 전 조회 3,138
11년 전 조회 5,964
11년 전 조회 3,217
11년 전 조회 3,904
11년 전 조회 5,112
11년 전 조회 3,020
11년 전 조회 3,856
11년 전 조회 2,206
11년 전 조회 3,246
11년 전 조회 5,904
11년 전 조회 3,060
11년 전 조회 3,253