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

· 11년 전 · 2205


관련파일 : 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,090
11년 전 조회 2,070
11년 전 조회 2,070
11년 전 조회 1,544
11년 전 조회 1,949
11년 전 조회 2,263
11년 전 조회 2,206
11년 전 조회 1,549
11년 전 조회 1,948
11년 전 조회 1,722
11년 전 조회 2,444
11년 전 조회 2,080
11년 전 조회 1,461
11년 전 조회 2,846
11년 전 조회 7,334
11년 전 조회 1,989
11년 전 조회 1,861
11년 전 조회 1,748
11년 전 조회 1,651
11년 전 조회 2,141
11년 전 조회 1,555
11년 전 조회 4,138
11년 전 조회 1,966
11년 전 조회 2,368
11년 전 조회 1,737
11년 전 조회 3,291
11년 전 조회 2,065
11년 전 조회 3,349
11년 전 조회 2,742
11년 전 조회 3,219
11년 전 조회 2,203
11년 전 조회 3,306
11년 전 조회 2,136
11년 전 조회 1,836
11년 전 조회 1,811
11년 전 조회 6,180
11년 전 조회 1,998
11년 전 조회 1,542
11년 전 조회 1,515
11년 전 조회 1,880
11년 전 조회 2,229
11년 전 조회 2,664
11년 전 조회 2,965
11년 전 조회 1,865
11년 전 조회 2,175
11년 전 조회 2,104
11년 전 조회 1,763
11년 전 조회 1,500
11년 전 조회 2,941
11년 전 조회 2,206
11년 전 조회 4,004
11년 전 조회 1,940
11년 전 조회 1,783
11년 전 조회 2,857
11년 전 조회 3,523
11년 전 조회 2,876
11년 전 조회 3,906
11년 전 조회 2,311
11년 전 조회 4,098
11년 전 조회 1,597
11년 전 조회 1,873
11년 전 조회 2,743
11년 전 조회 3,085
11년 전 조회 1,687
11년 전 조회 3,595
11년 전 조회 3,763
11년 전 조회 2,335
11년 전 조회 2,992
11년 전 조회 1,828
11년 전 조회 2,179
11년 전 조회 1,881
11년 전 조회 3,087
11년 전 조회 2,959
11년 전 조회 1,950
11년 전 조회 6,116
11년 전 조회 3,292
11년 전 조회 3,943
11년 전 조회 2,774
11년 전 조회 1,736
11년 전 조회 2,818
11년 전 조회 2,994
11년 전 조회 2,657
11년 전 조회 2,276
11년 전 조회 1,733
11년 전 조회 2,652
11년 전 조회 3,447
11년 전 조회 2,098
11년 전 조회 3,607
11년 전 조회 2,566
11년 전 조회 5,359
11년 전 조회 2,644
11년 전 조회 3,328
11년 전 조회 4,560
11년 전 조회 2,408
11년 전 조회 3,257
11년 전 조회 1,646
11년 전 조회 2,691
11년 전 조회 5,337
11년 전 조회 2,440
11년 전 조회 2,674