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

· 11년 전 · 2181


관련파일 : 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,071
11년 전 조회 2,051
11년 전 조회 2,053
11년 전 조회 1,525
11년 전 조회 1,929
11년 전 조회 2,241
11년 전 조회 2,195
11년 전 조회 1,527
11년 전 조회 1,933
11년 전 조회 1,711
11년 전 조회 2,437
11년 전 조회 2,066
11년 전 조회 1,446
11년 전 조회 2,818
11년 전 조회 7,313
11년 전 조회 1,967
11년 전 조회 1,848
11년 전 조회 1,720
11년 전 조회 1,629
11년 전 조회 2,130
11년 전 조회 1,532
11년 전 조회 4,117
11년 전 조회 1,949
11년 전 조회 2,341
11년 전 조회 1,718
11년 전 조회 3,276
11년 전 조회 2,050
11년 전 조회 3,316
11년 전 조회 2,719
11년 전 조회 3,199
11년 전 조회 2,180
11년 전 조회 3,285
11년 전 조회 2,113
11년 전 조회 1,821
11년 전 조회 1,781
11년 전 조회 6,156
11년 전 조회 1,981
11년 전 조회 1,524
11년 전 조회 1,484
11년 전 조회 1,860
11년 전 조회 2,209
11년 전 조회 2,645
11년 전 조회 2,947
11년 전 조회 1,836
11년 전 조회 2,157
11년 전 조회 2,086
11년 전 조회 1,731
11년 전 조회 1,482
11년 전 조회 2,914
11년 전 조회 2,182
11년 전 조회 3,980
11년 전 조회 1,917
11년 전 조회 1,759
11년 전 조회 2,838
11년 전 조회 3,503
11년 전 조회 2,856
11년 전 조회 3,883
11년 전 조회 2,293
11년 전 조회 4,079
11년 전 조회 1,573
11년 전 조회 1,854
11년 전 조회 2,721
11년 전 조회 3,058
11년 전 조회 1,670
11년 전 조회 3,572
11년 전 조회 3,732
11년 전 조회 2,311
11년 전 조회 2,967
11년 전 조회 1,798
11년 전 조회 2,153
11년 전 조회 1,868
11년 전 조회 3,066
11년 전 조회 2,939
11년 전 조회 1,923
11년 전 조회 6,098
11년 전 조회 3,265
11년 전 조회 3,920
11년 전 조회 2,756
11년 전 조회 1,715
11년 전 조회 2,793
11년 전 조회 2,971
11년 전 조회 2,621
11년 전 조회 2,249
11년 전 조회 1,709
11년 전 조회 2,632
11년 전 조회 3,422
11년 전 조회 2,077
11년 전 조회 3,582
11년 전 조회 2,545
11년 전 조회 5,327
11년 전 조회 2,621
11년 전 조회 3,293
11년 전 조회 4,543
11년 전 조회 2,393
11년 전 조회 3,222
11년 전 조회 1,628
11년 전 조회 2,660
11년 전 조회 5,310
11년 전 조회 2,415
11년 전 조회 2,649