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

· 11년 전 · 1573


관련파일 : 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,463
11년 전 조회 1,456
11년 전 조회 1,459
11년 전 조회 911
11년 전 조회 1,319
11년 전 조회 1,646
11년 전 조회 1,606
11년 전 조회 979
11년 전 조회 1,328
11년 전 조회 1,101
11년 전 조회 1,849
11년 전 조회 1,500
11년 전 조회 884
11년 전 조회 2,300
11년 전 조회 6,780
11년 전 조회 1,436
11년 전 조회 1,289
11년 전 조회 1,215
11년 전 조회 1,069
11년 전 조회 1,611
11년 전 조회 988
11년 전 조회 3,571
11년 전 조회 1,399
11년 전 조회 1,805
11년 전 조회 1,171
11년 전 조회 2,811
11년 전 조회 1,444
11년 전 조회 2,725
11년 전 조회 2,088
11년 전 조회 2,611
11년 전 조회 1,556
11년 전 조회 2,683
11년 전 조회 1,485
11년 전 조회 1,202
11년 전 조회 1,195
11년 전 조회 5,561
11년 전 조회 1,401
11년 전 조회 943
11년 전 조회 895
11년 전 조회 1,279
11년 전 조회 1,608
11년 전 조회 2,043
11년 전 조회 2,350
11년 전 조회 1,256
11년 전 조회 1,558
11년 전 조회 1,513
11년 전 조회 1,139
11년 전 조회 930
11년 전 조회 2,330
11년 전 조회 1,574
11년 전 조회 3,396
11년 전 조회 1,319
11년 전 조회 1,171
11년 전 조회 2,262
11년 전 조회 2,902
11년 전 조회 2,269
11년 전 조회 3,313
11년 전 조회 1,694
11년 전 조회 3,440
11년 전 조회 949
11년 전 조회 1,244
11년 전 조회 2,122
11년 전 조회 2,459
11년 전 조회 1,130
11년 전 조회 2,985
11년 전 조회 3,154
11년 전 조회 1,695
11년 전 조회 2,364
11년 전 조회 1,222
11년 전 조회 1,554
11년 전 조회 1,237
11년 전 조회 2,439
11년 전 조회 2,335
11년 전 조회 1,325
11년 전 조회 5,461
11년 전 조회 2,505
11년 전 조회 3,227
11년 전 조회 2,076
11년 전 조회 1,115
11년 전 조회 2,186
11년 전 조회 2,319
11년 전 조회 2,033
11년 전 조회 1,629
11년 전 조회 1,122
11년 전 조회 1,997
11년 전 조회 2,733
11년 전 조회 1,461
11년 전 조회 2,948
11년 전 조회 1,896
11년 전 조회 4,644
11년 전 조회 2,010
11년 전 조회 2,669
11년 전 조회 3,884
11년 전 조회 1,756
11년 전 조회 2,611
11년 전 조회 983
11년 전 조회 2,019
11년 전 조회 4,642
11년 전 조회 1,779
11년 전 조회 2,032
🐛 버그신고