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

· 11년 전 · 1500


관련파일 : 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,390
11년 전 조회 1,383
11년 전 조회 1,379
11년 전 조회 838
11년 전 조회 1,239
11년 전 조회 1,579
11년 전 조회 1,541
11년 전 조회 908
11년 전 조회 1,257
11년 전 조회 1,024
11년 전 조회 1,771
11년 전 조회 1,420
11년 전 조회 800
11년 전 조회 2,225
11년 전 조회 6,698
11년 전 조회 1,362
11년 전 조회 1,201
11년 전 조회 1,141
11년 전 조회 995
11년 전 조회 1,527
11년 전 조회 917
11년 전 조회 3,488
11년 전 조회 1,325
11년 전 조회 1,728
11년 전 조회 1,096
11년 전 조회 2,731
11년 전 조회 1,379
11년 전 조회 2,657
11년 전 조회 2,020
11년 전 조회 2,531
11년 전 조회 1,488
11년 전 조회 2,616
11년 전 조회 1,413
11년 전 조회 1,122
11년 전 조회 1,122
11년 전 조회 5,492
11년 전 조회 1,306
11년 전 조회 864
11년 전 조회 828
11년 전 조회 1,188
11년 전 조회 1,531
11년 전 조회 1,952
11년 전 조회 2,259
11년 전 조회 1,174
11년 전 조회 1,492
11년 전 조회 1,433
11년 전 조회 1,079
11년 전 조회 835
11년 전 조회 2,267
11년 전 조회 1,501
11년 전 조회 3,340
11년 전 조회 1,236
11년 전 조회 1,069
11년 전 조회 2,175
11년 전 조회 2,832
11년 전 조회 2,189
11년 전 조회 3,224
11년 전 조회 1,609
11년 전 조회 3,353
11년 전 조회 874
11년 전 조회 1,167
11년 전 조회 2,062
11년 전 조회 2,388
11년 전 조회 1,076
11년 전 조회 2,900
11년 전 조회 3,094
11년 전 조회 1,613
11년 전 조회 2,286
11년 전 조회 1,135
11년 전 조회 1,473
11년 전 조회 1,151
11년 전 조회 2,352
11년 전 조회 2,265
11년 전 조회 1,252
11년 전 조회 5,373
11년 전 조회 2,423
11년 전 조회 3,144
11년 전 조회 1,997
11년 전 조회 1,035
11년 전 조회 2,106
11년 전 조회 2,244
11년 전 조회 1,957
11년 전 조회 1,561
11년 전 조회 1,034
11년 전 조회 1,921
11년 전 조회 2,647
11년 전 조회 1,372
11년 전 조회 2,861
11년 전 조회 1,814
11년 전 조회 4,560
11년 전 조회 1,927
11년 전 조회 2,579
11년 전 조회 3,799
11년 전 조회 1,667
11년 전 조회 2,532
11년 전 조회 892
11년 전 조회 1,928
11년 전 조회 4,559
11년 전 조회 1,692
11년 전 조회 1,949
🐛 버그신고