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

· 11년 전 · 2594


관련파일 : 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,437
11년 전 조회 2,442
11년 전 조회 2,446
11년 전 조회 1,896
11년 전 조회 2,301
11년 전 조회 2,666
11년 전 조회 2,559
11년 전 조회 1,943
11년 전 조회 2,309
11년 전 조회 2,070
11년 전 조회 2,806
11년 전 조회 2,461
11년 전 조회 1,816
11년 전 조회 3,218
11년 전 조회 7,708
11년 전 조회 2,363
11년 전 조회 2,212
11년 전 조회 2,124
11년 전 조회 1,984
11년 전 조회 2,528
11년 전 조회 1,945
11년 전 조회 4,493
11년 전 조회 2,345
11년 전 조회 2,724
11년 전 조회 2,071
11년 전 조회 3,638
11년 전 조회 2,427
11년 전 조회 3,738
11년 전 조회 3,089
11년 전 조회 3,566
11년 전 조회 2,596
11년 전 조회 3,682
11년 전 조회 2,485
11년 전 조회 2,188
11년 전 조회 2,209
11년 전 조회 6,581
11년 전 조회 2,372
11년 전 조회 1,922
11년 전 조회 1,892
11년 전 조회 2,239
11년 전 조회 2,605
11년 전 조회 3,038
11년 전 조회 3,359
11년 전 조회 2,262
11년 전 조회 2,539
11년 전 조회 2,486
11년 전 조회 2,116
11년 전 조회 1,898
11년 전 조회 3,331
11년 전 조회 2,595
11년 전 조회 4,386
11년 전 조회 2,314
11년 전 조회 2,166
11년 전 조회 3,243
11년 전 조회 3,894
11년 전 조회 3,237
11년 전 조회 4,276
11년 전 조회 2,674
11년 전 조회 4,443
11년 전 조회 1,972
11년 전 조회 2,245
11년 전 조회 3,098
11년 전 조회 3,454
11년 전 조회 2,066
11년 전 조회 3,966
11년 전 조회 4,169
11년 전 조회 2,662
11년 전 조회 3,351
11년 전 조회 2,207
11년 전 조회 2,546
11년 전 조회 2,229
11년 전 조회 3,452
11년 전 조회 3,321
11년 전 조회 2,343
11년 전 조회 6,467
11년 전 조회 3,553
11년 전 조회 4,258
11년 전 조회 3,101
11년 전 조회 2,106
11년 전 조회 3,187
11년 전 조회 3,364
11년 전 조회 3,032
11년 전 조회 2,673
11년 전 조회 2,107
11년 전 조회 3,025
11년 전 조회 3,803
11년 전 조회 2,495
11년 전 조회 3,970
11년 전 조회 2,946
11년 전 조회 5,751
11년 전 조회 3,020
11년 전 조회 3,698
11년 전 조회 4,929
11년 전 조회 2,790
11년 전 조회 3,632
11년 전 조회 1,999
11년 전 조회 3,040
11년 전 조회 5,690
11년 전 조회 2,806
11년 전 조회 3,047