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

· 11년 전 · 1424


관련파일 : 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,315
11년 전 조회 1,307
11년 전 조회 1,301
11년 전 조회 758
11년 전 조회 1,162
11년 전 조회 1,494
11년 전 조회 1,462
11년 전 조회 829
11년 전 조회 1,180
11년 전 조회 947
11년 전 조회 1,701
11년 전 조회 1,344
11년 전 조회 720
11년 전 조회 2,147
11년 전 조회 6,620
11년 전 조회 1,280
11년 전 조회 1,127
11년 전 조회 1,057
11년 전 조회 921
11년 전 조회 1,452
11년 전 조회 845
11년 전 조회 3,411
11년 전 조회 1,251
11년 전 조회 1,646
11년 전 조회 1,013
11년 전 조회 2,655
11년 전 조회 1,287
11년 전 조회 2,578
11년 전 조회 1,938
11년 전 조회 2,452
11년 전 조회 1,399
11년 전 조회 2,532
11년 전 조회 1,348
11년 전 조회 1,032
11년 전 조회 1,041
11년 전 조회 5,420
11년 전 조회 1,227
11년 전 조회 788
11년 전 조회 752
11년 전 조회 1,115
11년 전 조회 1,456
11년 전 조회 1,873
11년 전 조회 2,183
11년 전 조회 1,088
11년 전 조회 1,410
11년 전 조회 1,354
11년 전 조회 996
11년 전 조회 751
11년 전 조회 2,180
11년 전 조회 1,425
11년 전 조회 3,258
11년 전 조회 1,158
11년 전 조회 1,017
11년 전 조회 2,099
11년 전 조회 2,755
11년 전 조회 2,116
11년 전 조회 3,149
11년 전 조회 1,537
11년 전 조회 3,280
11년 전 조회 797
11년 전 조회 1,097
11년 전 조회 1,974
11년 전 조회 2,314
11년 전 조회 1,012
11년 전 조회 2,832
11년 전 조회 3,024
11년 전 조회 1,534
11년 전 조회 2,207
11년 전 조회 1,054
11년 전 조회 1,407
11년 전 조회 1,086
11년 전 조회 2,277
11년 전 조회 2,194
11년 전 조회 1,175
11년 전 조회 5,310
11년 전 조회 2,354
11년 전 조회 3,069
11년 전 조회 1,919
11년 전 조회 965
11년 전 조회 2,036
11년 전 조회 2,169
11년 전 조회 1,880
11년 전 조회 1,493
11년 전 조회 959
11년 전 조회 1,853
11년 전 조회 2,575
11년 전 조회 1,304
11년 전 조회 2,790
11년 전 조회 1,735
11년 전 조회 4,487
11년 전 조회 1,857
11년 전 조회 2,511
11년 전 조회 3,732
11년 전 조회 1,602
11년 전 조회 2,461
11년 전 조회 828
11년 전 조회 1,860
11년 전 조회 4,492
11년 전 조회 1,617
11년 전 조회 1,875
🐛 버그신고