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

· 11년 전 · 2782


관련파일 : 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,660
11년 전 조회 2,682
11년 전 조회 2,666
11년 전 조회 2,120
11년 전 조회 2,512
11년 전 조회 2,872
11년 전 조회 2,797
11년 전 조회 2,154
11년 전 조회 2,517
11년 전 조회 2,294
11년 전 조회 3,013
11년 전 조회 2,675
11년 전 조회 2,031
11년 전 조회 3,418
11년 전 조회 7,940
11년 전 조회 2,560
11년 전 조회 2,449
11년 전 조회 2,335
11년 전 조회 2,205
11년 전 조회 2,752
11년 전 조회 2,146
11년 전 조회 4,710
11년 전 조회 2,558
11년 전 조회 2,932
11년 전 조회 2,283
11년 전 조회 3,833
11년 전 조회 2,602
11년 전 조회 3,954
11년 전 조회 3,289
11년 전 조회 3,770
11년 전 조회 2,789
11년 전 조회 3,870
11년 전 조회 2,694
11년 전 조회 2,400
11년 전 조회 2,377
11년 전 조회 6,767
11년 전 조회 2,570
11년 전 조회 2,110
11년 전 조회 2,096
11년 전 조회 2,452
11년 전 조회 2,818
11년 전 조회 3,254
11년 전 조회 3,562
11년 전 조회 2,481
11년 전 조회 2,750
11년 전 조회 2,716
11년 전 조회 2,317
11년 전 조회 2,129
11년 전 조회 3,518
11년 전 조회 2,783
11년 전 조회 4,592
11년 전 조회 2,523
11년 전 조회 2,397
11년 전 조회 3,455
11년 전 조회 4,112
11년 전 조회 3,466
11년 전 조회 4,503
11년 전 조회 2,889
11년 전 조회 4,635
11년 전 조회 2,173
11년 전 조회 2,461
11년 전 조회 3,288
11년 전 조회 3,661
11년 전 조회 2,261
11년 전 조회 4,192
11년 전 조회 4,370
11년 전 조회 2,895
11년 전 조회 3,589
11년 전 조회 2,447
11년 전 조회 2,764
11년 전 조회 2,452
11년 전 조회 3,675
11년 전 조회 3,537
11년 전 조회 2,592
11년 전 조회 6,684
11년 전 조회 3,771
11년 전 조회 4,469
11년 전 조회 3,314
11년 전 조회 2,348
11년 전 조회 3,428
11년 전 조회 3,554
11년 전 조회 3,248
11년 전 조회 2,881
11년 전 조회 2,356
11년 전 조회 3,226
11년 전 조회 3,979
11년 전 조회 2,674
11년 전 조회 4,191
11년 전 조회 3,145
11년 전 조회 5,970
11년 전 조회 3,222
11년 전 조회 3,907
11년 전 조회 5,127
11년 전 조회 3,028
11년 전 조회 3,863
11년 전 조회 2,210
11년 전 조회 3,254
11년 전 조회 5,906
11년 전 조회 3,067
11년 전 조회 3,258