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

· 11년 전 · 2757


관련파일 : 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,628
11년 전 조회 2,656
11년 전 조회 2,645
11년 전 조회 2,088
11년 전 조회 2,480
11년 전 조회 2,845
11년 전 조회 2,766
11년 전 조회 2,120
11년 전 조회 2,482
11년 전 조회 2,260
11년 전 조회 2,970
11년 전 조회 2,637
11년 전 조회 1,995
11년 전 조회 3,385
11년 전 조회 7,913
11년 전 조회 2,540
11년 전 조회 2,418
11년 전 조회 2,302
11년 전 조회 2,182
11년 전 조회 2,728
11년 전 조회 2,115
11년 전 조회 4,671
11년 전 조회 2,521
11년 전 조회 2,903
11년 전 조회 2,251
11년 전 조회 3,808
11년 전 조회 2,576
11년 전 조회 3,929
11년 전 조회 3,248
11년 전 조회 3,750
11년 전 조회 2,757
11년 전 조회 3,852
11년 전 조회 2,667
11년 전 조회 2,374
11년 전 조회 2,352
11년 전 조회 6,744
11년 전 조회 2,546
11년 전 조회 2,080
11년 전 조회 2,069
11년 전 조회 2,428
11년 전 조회 2,793
11년 전 조회 3,220
11년 전 조회 3,538
11년 전 조회 2,450
11년 전 조회 2,724
11년 전 조회 2,686
11년 전 조회 2,291
11년 전 조회 2,099
11년 전 조회 3,498
11년 전 조회 2,758
11년 전 조회 4,561
11년 전 조회 2,497
11년 전 조회 2,366
11년 전 조회 3,428
11년 전 조회 4,079
11년 전 조회 3,429
11년 전 조회 4,480
11년 전 조회 2,861
11년 전 조회 4,607
11년 전 조회 2,150
11년 전 조회 2,433
11년 전 조회 3,266
11년 전 조회 3,630
11년 전 조회 2,240
11년 전 조회 4,163
11년 전 조회 4,338
11년 전 조회 2,861
11년 전 조회 3,571
11년 전 조회 2,416
11년 전 조회 2,734
11년 전 조회 2,425
11년 전 조회 3,647
11년 전 조회 3,511
11년 전 조회 2,557
11년 전 조회 6,649
11년 전 조회 3,735
11년 전 조회 4,438
11년 전 조회 3,283
11년 전 조회 2,322
11년 전 조회 3,404
11년 전 조회 3,530
11년 전 조회 3,219
11년 전 조회 2,840
11년 전 조회 2,317
11년 전 조회 3,199
11년 전 조회 3,953
11년 전 조회 2,645
11년 전 조회 4,166
11년 전 조회 3,114
11년 전 조회 5,945
11년 전 조회 3,192
11년 전 조회 3,893
11년 전 조회 5,086
11년 전 조회 2,990
11년 전 조회 3,828
11년 전 조회 2,186
11년 전 조회 3,227
11년 전 조회 5,881
11년 전 조회 3,034
11년 전 조회 3,236