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

· 11년 전 · 1441


관련파일 : 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,344
11년 전 조회 1,331
11년 전 조회 1,327
11년 전 조회 786
11년 전 조회 1,190
11년 전 조회 1,524
11년 전 조회 1,486
11년 전 조회 864
11년 전 조회 1,207
11년 전 조회 968
11년 전 조회 1,726
11년 전 조회 1,363
11년 전 조회 744
11년 전 조회 2,179
11년 전 조회 6,648
11년 전 조회 1,306
11년 전 조회 1,145
11년 전 조회 1,078
11년 전 조회 943
11년 전 조회 1,474
11년 전 조회 872
11년 전 조회 3,444
11년 전 조회 1,274
11년 전 조회 1,672
11년 전 조회 1,043
11년 전 조회 2,678
11년 전 조회 1,315
11년 전 조회 2,600
11년 전 조회 1,959
11년 전 조회 2,477
11년 전 조회 1,423
11년 전 조회 2,551
11년 전 조회 1,363
11년 전 조회 1,054
11년 전 조회 1,066
11년 전 조회 5,443
11년 전 조회 1,248
11년 전 조회 811
11년 전 조회 776
11년 전 조회 1,130
11년 전 조회 1,482
11년 전 조회 1,896
11년 전 조회 2,206
11년 전 조회 1,112
11년 전 조회 1,434
11년 전 조회 1,376
11년 전 조회 1,018
11년 전 조회 774
11년 전 조회 2,202
11년 전 조회 1,442
11년 전 조회 3,277
11년 전 조회 1,178
11년 전 조회 1,028
11년 전 조회 2,113
11년 전 조회 2,769
11년 전 조회 2,135
11년 전 조회 3,170
11년 전 조회 1,552
11년 전 조회 3,295
11년 전 조회 816
11년 전 조회 1,113
11년 전 조회 1,991
11년 전 조회 2,332
11년 전 조회 1,016
11년 전 조회 2,855
11년 전 조회 3,036
11년 전 조회 1,553
11년 전 조회 2,228
11년 전 조회 1,075
11년 전 조회 1,422
11년 전 조회 1,104
11년 전 조회 2,295
11년 전 조회 2,209
11년 전 조회 1,192
11년 전 조회 5,326
11년 전 조회 2,376
11년 전 조회 3,085
11년 전 조회 1,935
11년 전 조회 979
11년 전 조회 2,055
11년 전 조회 2,189
11년 전 조회 1,896
11년 전 조회 1,504
11년 전 조회 975
11년 전 조회 1,868
11년 전 조회 2,590
11년 전 조회 1,323
11년 전 조회 2,802
11년 전 조회 1,747
11년 전 조회 4,504
11년 전 조회 1,872
11년 전 조회 2,528
11년 전 조회 3,745
11년 전 조회 1,612
11년 전 조회 2,476
11년 전 조회 839
11년 전 조회 1,873
11년 전 조회 4,507
11년 전 조회 1,633
11년 전 조회 1,887
🐛 버그신고