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

· 11년 전 · 3000


관련파일 : 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,908
11년 전 조회 2,893
11년 전 조회 2,357
11년 전 조회 2,759
11년 전 조회 3,103
11년 전 조회 3,048
11년 전 조회 2,364
11년 전 조회 2,730
11년 전 조회 2,522
11년 전 조회 3,257
11년 전 조회 2,887
11년 전 조회 2,252
11년 전 조회 3,643
11년 전 조회 8,168
11년 전 조회 2,792
11년 전 조회 2,662
11년 전 조회 2,544
11년 전 조회 2,432
11년 전 조회 3,001
11년 전 조회 2,347
11년 전 조회 4,931
11년 전 조회 2,775
11년 전 조회 3,153
11년 전 조회 2,510
11년 전 조회 4,059
11년 전 조회 2,842
11년 전 조회 4,189
11년 전 조회 3,496
11년 전 조회 4,012
11년 전 조회 3,008
11년 전 조회 4,106
11년 전 조회 2,939
11년 전 조회 2,631
11년 전 조회 2,606
11년 전 조회 6,974
11년 전 조회 2,810
11년 전 조회 2,351
11년 전 조회 2,310
11년 전 조회 2,692
11년 전 조회 3,044
11년 전 조회 3,475
11년 전 조회 3,798
11년 전 조회 2,718
11년 전 조회 2,979
11년 전 조회 2,935
11년 전 조회 2,543
11년 전 조회 2,361
11년 전 조회 3,739
11년 전 조회 3,001
11년 전 조회 4,814
11년 전 조회 2,739
11년 전 조회 2,647
11년 전 조회 3,691
11년 전 조회 4,361
11년 전 조회 3,693
11년 전 조회 4,714
11년 전 조회 3,110
11년 전 조회 4,883
11년 전 조회 2,405
11년 전 조회 2,690
11년 전 조회 3,515
11년 전 조회 3,855
11년 전 조회 2,468
11년 전 조회 4,394
11년 전 조회 4,565
11년 전 조회 3,126
11년 전 조회 3,794
11년 전 조회 2,653
11년 전 조회 2,955
11년 전 조회 2,670
11년 전 조회 3,882
11년 전 조회 3,750
11년 전 조회 2,786
11년 전 조회 6,891
11년 전 조회 3,975
11년 전 조회 4,700
11년 전 조회 3,531
11년 전 조회 2,558
11년 전 조회 3,628
11년 전 조회 3,770
11년 전 조회 3,446
11년 전 조회 3,073
11년 전 조회 2,548
11년 전 조회 3,438
11년 전 조회 4,219
11년 전 조회 2,878
11년 전 조회 4,400
11년 전 조회 3,346
11년 전 조회 6,182
11년 전 조회 3,446
11년 전 조회 4,096
11년 전 조회 5,330
11년 전 조회 3,217
11년 전 조회 4,054
11년 전 조회 2,398
11년 전 조회 3,462
11년 전 조회 6,115
11년 전 조회 3,269
11년 전 조회 3,443