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

· 11년 전 · 2559


관련파일 : 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년 전 조회 2,403
11년 전 조회 2,409
11년 전 조회 2,414
11년 전 조회 1,860
11년 전 조회 2,270
11년 전 조회 2,644
11년 전 조회 2,531
11년 전 조회 1,912
11년 전 조회 2,274
11년 전 조회 2,042
11년 전 조회 2,772
11년 전 조회 2,422
11년 전 조회 1,788
11년 전 조회 3,184
11년 전 조회 7,678
11년 전 조회 2,322
11년 전 조회 2,183
11년 전 조회 2,092
11년 전 조회 1,949
11년 전 조회 2,494
11년 전 조회 1,908
11년 전 조회 4,458
11년 전 조회 2,306
11년 전 조회 2,704
11년 전 조회 2,051
11년 전 조회 3,593
11년 전 조회 2,401
11년 전 조회 3,710
11년 전 조회 3,066
11년 전 조회 3,539
11년 전 조회 2,568
11년 전 조회 3,655
11년 전 조회 2,452
11년 전 조회 2,155
11년 전 조회 2,186
11년 전 조회 6,551
11년 전 조회 2,350
11년 전 조회 1,893
11년 전 조회 1,858
11년 전 조회 2,200
11년 전 조회 2,564
11년 전 조회 2,998
11년 전 조회 3,313
11년 전 조회 2,232
11년 전 조회 2,505
11년 전 조회 2,448
11년 전 조회 2,092
11년 전 조회 1,865
11년 전 조회 3,307
11년 전 조회 2,560
11년 전 조회 4,358
11년 전 조회 2,274
11년 전 조회 2,132
11년 전 조회 3,203
11년 전 조회 3,866
11년 전 조회 3,213
11년 전 조회 4,243
11년 전 조회 2,638
11년 전 조회 4,413
11년 전 조회 1,932
11년 전 조회 2,210
11년 전 조회 3,067
11년 전 조회 3,416
11년 전 조회 2,025
11년 전 조회 3,932
11년 전 조회 4,125
11년 전 조회 2,638
11년 전 조회 3,308
11년 전 조회 2,166
11년 전 조회 2,525
11년 전 조회 2,191
11년 전 조회 3,416
11년 전 조회 3,276
11년 전 조회 2,300
11년 전 조회 6,434
11년 전 조회 3,518
11년 전 조회 4,226
11년 전 조회 3,063
11년 전 조회 2,057
11년 전 조회 3,156
11년 전 조회 3,319
11년 전 조회 2,999
11년 전 조회 2,632
11년 전 조회 2,074
11년 전 조회 2,998
11년 전 조회 3,776
11년 전 조회 2,470
11년 전 조회 3,933
11년 전 조회 2,911
11년 전 조회 5,727
11년 전 조회 2,986
11년 전 조회 3,661
11년 전 조회 4,890
11년 전 조회 2,751
11년 전 조회 3,590
11년 전 조회 1,960
11년 전 조회 3,007
11년 전 조회 5,659
11년 전 조회 2,762
11년 전 조회 3,003