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

· 11년 전 · 1405


관련파일 : 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년 전 조회 1,294
11년 전 조회 1,284
11년 전 조회 1,278
11년 전 조회 740
11년 전 조회 1,137
11년 전 조회 1,480
11년 전 조회 1,441
11년 전 조회 815
11년 전 조회 1,160
11년 전 조회 928
11년 전 조회 1,683
11년 전 조회 1,324
11년 전 조회 700
11년 전 조회 2,133
11년 전 조회 6,602
11년 전 조회 1,266
11년 전 조회 1,111
11년 전 조회 1,043
11년 전 조회 897
11년 전 조회 1,430
11년 전 조회 829
11년 전 조회 3,388
11년 전 조회 1,233
11년 전 조회 1,628
11년 전 조회 999
11년 전 조회 2,634
11년 전 조회 1,268
11년 전 조회 2,554
11년 전 조회 1,921
11년 전 조회 2,430
11년 전 조회 1,379
11년 전 조회 2,510
11년 전 조회 1,320
11년 전 조회 1,017
11년 전 조회 1,025
11년 전 조회 5,405
11년 전 조회 1,202
11년 전 조회 767
11년 전 조회 741
11년 전 조회 1,090
11년 전 조회 1,437
11년 전 조회 1,855
11년 전 조회 2,163
11년 전 조회 1,069
11년 전 조회 1,390
11년 전 조회 1,335
11년 전 조회 978
11년 전 조회 732
11년 전 조회 2,161
11년 전 조회 1,406
11년 전 조회 3,237
11년 전 조회 1,140
11년 전 조회 997
11년 전 조회 2,078
11년 전 조회 2,734
11년 전 조회 2,096
11년 전 조회 3,130
11년 전 조회 1,515
11년 전 조회 3,264
11년 전 조회 776
11년 전 조회 1,076
11년 전 조회 1,951
11년 전 조회 2,301
11년 전 조회 1,007
11년 전 조회 2,816
11년 전 조회 3,018
11년 전 조회 1,511
11년 전 조회 2,187
11년 전 조회 1,042
11년 전 조회 1,392
11년 전 조회 1,065
11년 전 조회 2,260
11년 전 조회 2,178
11년 전 조회 1,159
11년 전 조회 5,291
11년 전 조회 2,341
11년 전 조회 3,054
11년 전 조회 1,903
11년 전 조회 943
11년 전 조회 2,023
11년 전 조회 2,154
11년 전 조회 1,871
11년 전 조회 1,481
11년 전 조회 940
11년 전 조회 1,837
11년 전 조회 2,558
11년 전 조회 1,286
11년 전 조회 2,769
11년 전 조회 1,715
11년 전 조회 4,470
11년 전 조회 1,840
11년 전 조회 2,495
11년 전 조회 3,711
11년 전 조회 1,578
11년 전 조회 2,452
11년 전 조회 808
11년 전 조회 1,839
11년 전 조회 4,472
11년 전 조회 1,597
11년 전 조회 1,857
🐛 버그신고