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

· 11년 전 · 2997


관련파일 : 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,899
11년 전 조회 2,907
11년 전 조회 2,890
11년 전 조회 2,353
11년 전 조회 2,755
11년 전 조회 3,103
11년 전 조회 3,048
11년 전 조회 2,364
11년 전 조회 2,727
11년 전 조회 2,517
11년 전 조회 3,253
11년 전 조회 2,887
11년 전 조회 2,251
11년 전 조회 3,643
11년 전 조회 8,166
11년 전 조회 2,792
11년 전 조회 2,658
11년 전 조회 2,542
11년 전 조회 2,432
11년 전 조회 2,998
11년 전 조회 2,345
11년 전 조회 4,930
11년 전 조회 2,775
11년 전 조회 3,151
11년 전 조회 2,510
11년 전 조회 4,055
11년 전 조회 2,839
11년 전 조회 4,188
11년 전 조회 3,493
11년 전 조회 4,008
11년 전 조회 3,006
11년 전 조회 4,102
11년 전 조회 2,938
11년 전 조회 2,630
11년 전 조회 2,605
11년 전 조회 6,972
11년 전 조회 2,809
11년 전 조회 2,349
11년 전 조회 2,309
11년 전 조회 2,692
11년 전 조회 3,043
11년 전 조회 3,472
11년 전 조회 3,792
11년 전 조회 2,716
11년 전 조회 2,975
11년 전 조회 2,933
11년 전 조회 2,539
11년 전 조회 2,358
11년 전 조회 3,738
11년 전 조회 2,998
11년 전 조회 4,812
11년 전 조회 2,733
11년 전 조회 2,647
11년 전 조회 3,691
11년 전 조회 4,359
11년 전 조회 3,693
11년 전 조회 4,714
11년 전 조회 3,110
11년 전 조회 4,881
11년 전 조회 2,401
11년 전 조회 2,687
11년 전 조회 3,513
11년 전 조회 3,854
11년 전 조회 2,468
11년 전 조회 4,391
11년 전 조회 4,563
11년 전 조회 3,122
11년 전 조회 3,792
11년 전 조회 2,651
11년 전 조회 2,954
11년 전 조회 2,667
11년 전 조회 3,877
11년 전 조회 3,743
11년 전 조회 2,785
11년 전 조회 6,890
11년 전 조회 3,975
11년 전 조회 4,696
11년 전 조회 3,530
11년 전 조회 2,557
11년 전 조회 3,627
11년 전 조회 3,768
11년 전 조회 3,445
11년 전 조회 3,073
11년 전 조회 2,545
11년 전 조회 3,436
11년 전 조회 4,217
11년 전 조회 2,877
11년 전 조회 4,399
11년 전 조회 3,343
11년 전 조회 6,179
11년 전 조회 3,443
11년 전 조회 4,092
11년 전 조회 5,326
11년 전 조회 3,214
11년 전 조회 4,054
11년 전 조회 2,396
11년 전 조회 3,460
11년 전 조회 6,111
11년 전 조회 3,268
11년 전 조회 3,440