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

· 11년 전 · 2800


관련파일 : 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,682
11년 전 조회 2,700
11년 전 조회 2,681
11년 전 조회 2,142
11년 전 조회 2,529
11년 전 조회 2,891
11년 전 조회 2,817
11년 전 조회 2,171
11년 전 조회 2,537
11년 전 조회 2,319
11년 전 조회 3,034
11년 전 조회 2,691
11년 전 조회 2,043
11년 전 조회 3,440
11년 전 조회 7,962
11년 전 조회 2,586
11년 전 조회 2,472
11년 전 조회 2,348
11년 전 조회 2,221
11년 전 조회 2,777
11년 전 조회 2,168
11년 전 조회 4,743
11년 전 조회 2,577
11년 전 조회 2,952
11년 전 조회 2,311
11년 전 조회 3,859
11년 전 조회 2,629
11년 전 조회 3,972
11년 전 조회 3,307
11년 전 조회 3,800
11년 전 조회 2,805
11년 전 조회 3,895
11년 전 조회 2,718
11년 전 조회 2,413
11년 전 조회 2,395
11년 전 조회 6,793
11년 전 조회 2,592
11년 전 조회 2,127
11년 전 조회 2,116
11년 전 조회 2,474
11년 전 조회 2,834
11년 전 조회 3,270
11년 전 조회 3,573
11년 전 조회 2,502
11년 전 조회 2,768
11년 전 조회 2,738
11년 전 조회 2,337
11년 전 조회 2,149
11년 전 조회 3,540
11년 전 조회 2,801
11년 전 조회 4,614
11년 전 조회 2,537
11년 전 조회 2,421
11년 전 조회 3,473
11년 전 조회 4,132
11년 전 조회 3,484
11년 전 조회 4,532
11년 전 조회 2,904
11년 전 조회 4,655
11년 전 조회 2,194
11년 전 조회 2,480
11년 전 조회 3,306
11년 전 조회 3,674
11년 전 조회 2,275
11년 전 조회 4,202
11년 전 조회 4,391
11년 전 조회 2,913
11년 전 조회 3,608
11년 전 조회 2,462
11년 전 조회 2,782
11년 전 조회 2,467
11년 전 조회 3,696
11년 전 조회 3,554
11년 전 조회 2,606
11년 전 조회 6,702
11년 전 조회 3,781
11년 전 조회 4,491
11년 전 조회 3,334
11년 전 조회 2,366
11년 전 조회 3,453
11년 전 조회 3,572
11년 전 조회 3,267
11년 전 조회 2,904
11년 전 조회 2,373
11년 전 조회 3,245
11년 전 조회 3,998
11년 전 조회 2,693
11년 전 조회 4,214
11년 전 조회 3,166
11년 전 조회 5,996
11년 전 조회 3,238
11년 전 조회 3,930
11년 전 조회 5,150
11년 전 조회 3,050
11년 전 조회 3,874
11년 전 조회 2,225
11년 전 조회 3,272
11년 전 조회 5,928
11년 전 조회 3,080
11년 전 조회 3,275