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

· 11년 전 · 2875


관련파일 : 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,771
11년 전 조회 2,794
11년 전 조회 2,770
11년 전 조회 2,240
11년 전 조회 2,623
11년 전 조회 2,978
11년 전 조회 2,928
11년 전 조회 2,254
11년 전 조회 2,625
11년 전 조회 2,400
11년 전 조회 3,139
11년 전 조회 2,768
11년 전 조회 2,127
11년 전 조회 3,550
11년 전 조회 8,053
11년 전 조회 2,680
11년 전 조회 2,555
11년 전 조회 2,424
11년 전 조회 2,313
11년 전 조회 2,871
11년 전 조회 2,249
11년 전 조회 4,824
11년 전 조회 2,675
11년 전 조회 3,047
11년 전 조회 2,402
11년 전 조회 3,950
11년 전 조회 2,720
11년 전 조회 4,078
11년 전 조회 3,391
11년 전 조회 3,881
11년 전 조회 2,891
11년 전 조회 3,991
11년 전 조회 2,815
11년 전 조회 2,512
11년 전 조회 2,483
11년 전 조회 6,868
11년 전 조회 2,692
11년 전 조회 2,237
11년 전 조회 2,196
11년 전 조회 2,564
11년 전 조회 2,933
11년 전 조회 3,369
11년 전 조회 3,659
11년 전 조회 2,603
11년 전 조회 2,858
11년 전 조회 2,811
11년 전 조회 2,412
11년 전 조회 2,244
11년 전 조회 3,625
11년 전 조회 2,876
11년 전 조회 4,703
11년 전 조회 2,621
11년 전 조회 2,524
11년 전 조회 3,569
11년 전 조회 4,226
11년 전 조회 3,583
11년 전 조회 4,615
11년 전 조회 2,990
11년 전 조회 4,755
11년 전 조회 2,275
11년 전 조회 2,561
11년 전 조회 3,406
11년 전 조회 3,754
11년 전 조회 2,357
11년 전 조회 4,296
11년 전 조회 4,473
11년 전 조회 3,003
11년 전 조회 3,677
11년 전 조회 2,548
11년 전 조회 2,853
11년 전 조회 2,558
11년 전 조회 3,783
11년 전 조회 3,636
11년 전 조회 2,677
11년 전 조회 6,781
11년 전 조회 3,858
11년 전 조회 4,578
11년 전 조회 3,421
11년 전 조회 2,447
11년 전 조회 3,528
11년 전 조회 3,660
11년 전 조회 3,339
11년 전 조회 2,970
11년 전 조회 2,446
11년 전 조회 3,326
11년 전 조회 4,089
11년 전 조회 2,772
11년 전 조회 4,301
11년 전 조회 3,231
11년 전 조회 6,082
11년 전 조회 3,333
11년 전 조회 4,004
11년 전 조회 5,218
11년 전 조회 3,119
11년 전 조회 3,954
11년 전 조회 2,294
11년 전 조회 3,357
11년 전 조회 6,002
11년 전 조회 3,164
11년 전 조회 3,351