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

· 11년 전 · 1431


관련파일 : 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,326
11년 전 조회 1,317
11년 전 조회 1,311
11년 전 조회 768
11년 전 조회 1,170
11년 전 조회 1,508
11년 전 조회 1,468
11년 전 조회 841
11년 전 조회 1,190
11년 전 조회 957
11년 전 조회 1,712
11년 전 조회 1,352
11년 전 조회 731
11년 전 조회 2,155
11년 전 조회 6,632
11년 전 조회 1,288
11년 전 조회 1,135
11년 전 조회 1,065
11년 전 조회 930
11년 전 조회 1,459
11년 전 조회 853
11년 전 조회 3,420
11년 전 조회 1,261
11년 전 조회 1,652
11년 전 조회 1,029
11년 전 조회 2,664
11년 전 조회 1,297
11년 전 조회 2,586
11년 전 조회 1,947
11년 전 조회 2,463
11년 전 조회 1,407
11년 전 조회 2,538
11년 전 조회 1,357
11년 전 조회 1,042
11년 전 조회 1,049
11년 전 조회 5,426
11년 전 조회 1,237
11년 전 조회 800
11년 전 조회 763
11년 전 조회 1,121
11년 전 조회 1,465
11년 전 조회 1,883
11년 전 조회 2,194
11년 전 조회 1,100
11년 전 조회 1,424
11년 전 조회 1,364
11년 전 조회 1,003
11년 전 조회 763
11년 전 조회 2,189
11년 전 조회 1,432
11년 전 조회 3,264
11년 전 조회 1,168
11년 전 조회 1,022
11년 전 조회 2,104
11년 전 조회 2,762
11년 전 조회 2,120
11년 전 조회 3,156
11년 전 조회 1,546
11년 전 조회 3,288
11년 전 조회 808
11년 전 조회 1,107
11년 전 조회 1,981
11년 전 조회 2,321
11년 전 조회 1,013
11년 전 조회 2,840
11년 전 조회 3,028
11년 전 조회 1,540
11년 전 조회 2,218
11년 전 조회 1,067
11년 전 조회 1,415
11년 전 조회 1,094
11년 전 조회 2,288
11년 전 조회 2,199
11년 전 조회 1,181
11년 전 조회 5,317
11년 전 조회 2,366
11년 전 조회 3,076
11년 전 조회 1,926
11년 전 조회 973
11년 전 조회 2,046
11년 전 조회 2,180
11년 전 조회 1,887
11년 전 조회 1,496
11년 전 조회 967
11년 전 조회 1,861
11년 전 조회 2,583
11년 전 조회 1,313
11년 전 조회 2,797
11년 전 조회 1,740
11년 전 조회 4,499
11년 전 조회 1,865
11년 전 조회 2,521
11년 전 조회 3,738
11년 전 조회 1,608
11년 전 조회 2,471
11년 전 조회 834
11년 전 조회 1,867
11년 전 조회 4,503
11년 전 조회 1,623
11년 전 조회 1,881
🐛 버그신고