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

· 11년 전 · 1540


관련파일 : 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,432
11년 전 조회 1,430
11년 전 조회 1,425
11년 전 조회 880
11년 전 조회 1,280
11년 전 조회 1,614
11년 전 조회 1,575
11년 전 조회 942
11년 전 조회 1,290
11년 전 조회 1,063
11년 전 조회 1,823
11년 전 조회 1,461
11년 전 조회 849
11년 전 조회 2,274
11년 전 조회 6,735
11년 전 조회 1,396
11년 전 조회 1,246
11년 전 조회 1,180
11년 전 조회 1,041
11년 전 조회 1,576
11년 전 조회 955
11년 전 조회 3,533
11년 전 조회 1,369
11년 전 조회 1,774
11년 전 조회 1,140
11년 전 조회 2,775
11년 전 조회 1,413
11년 전 조회 2,692
11년 전 조회 2,061
11년 전 조회 2,579
11년 전 조회 1,525
11년 전 조회 2,651
11년 전 조회 1,455
11년 전 조회 1,153
11년 전 조회 1,156
11년 전 조회 5,540
11년 전 조회 1,362
11년 전 조회 907
11년 전 조회 869
11년 전 조회 1,238
11년 전 조회 1,574
11년 전 조회 2,005
11년 전 조회 2,303
11년 전 조회 1,217
11년 전 조회 1,525
11년 전 조회 1,473
11년 전 조회 1,114
11년 전 조회 881
11년 전 조회 2,301
11년 전 조회 1,541
11년 전 조회 3,372
11년 전 조회 1,284
11년 전 조회 1,123
11년 전 조회 2,224
11년 전 조회 2,870
11년 전 조회 2,228
11년 전 조회 3,274
11년 전 조회 1,657
11년 전 조회 3,399
11년 전 조회 914
11년 전 조회 1,210
11년 전 조회 2,094
11년 전 조회 2,432
11년 전 조회 1,104
11년 전 조회 2,940
11년 전 조회 3,119
11년 전 조회 1,657
11년 전 조회 2,320
11년 전 조회 1,182
11년 전 조회 1,514
11년 전 조회 1,193
11년 전 조회 2,397
11년 전 조회 2,303
11년 전 조회 1,290
11년 전 조회 5,422
11년 전 조회 2,466
11년 전 조회 3,186
11년 전 조회 2,031
11년 전 조회 1,078
11년 전 조회 2,146
11년 전 조회 2,287
11년 전 조회 1,991
11년 전 조회 1,599
11년 전 조회 1,088
11년 전 조회 1,964
11년 전 조회 2,694
11년 전 조회 1,414
11년 전 조회 2,909
11년 전 조회 1,859
11년 전 조회 4,610
11년 전 조회 1,974
11년 전 조회 2,628
11년 전 조회 3,844
11년 전 조회 1,714
11년 전 조회 2,572
11년 전 조회 939
11년 전 조회 1,967
11년 전 조회 4,599
11년 전 조회 1,734
11년 전 조회 1,992
🐛 버그신고