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

· 11년 전 · 2695


관련파일 : 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,572
11년 전 조회 2,583
11년 전 조회 2,585
11년 전 조회 2,030
11년 전 조회 2,425
11년 전 조회 2,805
11년 전 조회 2,706
11년 전 조회 2,068
11년 전 조회 2,436
11년 전 조회 2,204
11년 전 조회 2,915
11년 전 조회 2,581
11년 전 조회 1,950
11년 전 조회 3,334
11년 전 조회 7,855
11년 전 조회 2,490
11년 전 조회 2,363
11년 전 조회 2,260
11년 전 조회 2,121
11년 전 조회 2,669
11년 전 조회 2,069
11년 전 조회 4,620
11년 전 조회 2,473
11년 전 조회 2,851
11년 전 조회 2,201
11년 전 조회 3,760
11년 전 조회 2,532
11년 전 조회 3,874
11년 전 조회 3,195
11년 전 조회 3,703
11년 전 조회 2,706
11년 전 조회 3,803
11년 전 조회 2,614
11년 전 조회 2,324
11년 전 조회 2,302
11년 전 조회 6,695
11년 전 조회 2,486
11년 전 조회 2,039
11년 전 조회 2,017
11년 전 조회 2,372
11년 전 조회 2,720
11년 전 조회 3,168
11년 전 조회 3,480
11년 전 조회 2,396
11년 전 조회 2,669
11년 전 조회 2,622
11년 전 조회 2,245
11년 전 조회 2,032
11년 전 조회 3,442
11년 전 조회 2,696
11년 전 조회 4,501
11년 전 조회 2,448
11년 전 조회 2,316
11년 전 조회 3,375
11년 전 조회 4,034
11년 전 조회 3,381
11년 전 조회 4,413
11년 전 조회 2,814
11년 전 조회 4,565
11년 전 조회 2,099
11년 전 조회 2,374
11년 전 조회 3,222
11년 전 조회 3,578
11년 전 조회 2,184
11년 전 조회 4,114
11년 전 조회 4,296
11년 전 조회 2,793
11년 전 조회 3,512
11년 전 조회 2,365
11년 전 조회 2,669
11년 전 조회 2,367
11년 전 조회 3,594
11년 전 조회 3,440
11년 전 조회 2,479
11년 전 조회 6,599
11년 전 조회 3,684
11년 전 조회 4,375
11년 전 조회 3,235
11년 전 조회 2,263
11년 전 조회 3,344
11년 전 조회 3,489
11년 전 조회 3,171
11년 전 조회 2,789
11년 전 조회 2,256
11년 전 조회 3,150
11년 전 조회 3,911
11년 전 조회 2,601
11년 전 조회 4,120
11년 전 조회 3,062
11년 전 조회 5,894
11년 전 조회 3,140
11년 전 조회 3,838
11년 전 조회 5,035
11년 전 조회 2,931
11년 전 조회 3,759
11년 전 조회 2,136
11년 전 조회 3,159
11년 전 조회 5,837
11년 전 조회 2,952
11년 전 조회 3,172