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

· 11년 전 · 2699


관련파일 : 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,574
11년 전 조회 2,594
11년 전 조회 2,594
11년 전 조회 2,037
11년 전 조회 2,435
11년 전 조회 2,806
11년 전 조회 2,711
11년 전 조회 2,072
11년 전 조회 2,443
11년 전 조회 2,211
11년 전 조회 2,920
11년 전 조회 2,589
11년 전 조회 1,954
11년 전 조회 3,342
11년 전 조회 7,861
11년 전 조회 2,491
11년 전 조회 2,369
11년 전 조회 2,262
11년 전 조회 2,126
11년 전 조회 2,676
11년 전 조회 2,072
11년 전 조회 4,622
11년 전 조회 2,476
11년 전 조회 2,856
11년 전 조회 2,209
11년 전 조회 3,772
11년 전 조회 2,536
11년 전 조회 3,880
11년 전 조회 3,201
11년 전 조회 3,706
11년 전 조회 2,710
11년 전 조회 3,807
11년 전 조회 2,620
11년 전 조회 2,330
11년 전 조회 2,306
11년 전 조회 6,701
11년 전 조회 2,498
11년 전 조회 2,042
11년 전 조회 2,017
11년 전 조회 2,380
11년 전 조회 2,732
11년 전 조회 3,177
11년 전 조회 3,486
11년 전 조회 2,403
11년 전 조회 2,677
11년 전 조회 2,632
11년 전 조회 2,245
11년 전 조회 2,041
11년 전 조회 3,443
11년 전 조회 2,700
11년 전 조회 4,511
11년 전 조회 2,453
11년 전 조회 2,322
11년 전 조회 3,382
11년 전 조회 4,038
11년 전 조회 3,386
11년 전 조회 4,418
11년 전 조회 2,822
11년 전 조회 4,567
11년 전 조회 2,105
11년 전 조회 2,380
11년 전 조회 3,224
11년 전 조회 3,585
11년 전 조회 2,189
11년 전 조회 4,121
11년 전 조회 4,299
11년 전 조회 2,800
11년 전 조회 3,519
11년 전 조회 2,370
11년 전 조회 2,676
11년 전 조회 2,376
11년 전 조회 3,596
11년 전 조회 3,449
11년 전 조회 2,487
11년 전 조회 6,601
11년 전 조회 3,691
11년 전 조회 4,378
11년 전 조회 3,236
11년 전 조회 2,267
11년 전 조회 3,351
11년 전 조회 3,490
11년 전 조회 3,176
11년 전 조회 2,791
11년 전 조회 2,266
11년 전 조회 3,151
11년 전 조회 3,913
11년 전 조회 2,607
11년 전 조회 4,128
11년 전 조회 3,067
11년 전 조회 5,896
11년 전 조회 3,144
11년 전 조회 3,847
11년 전 조회 5,042
11년 전 조회 2,938
11년 전 조회 3,765
11년 전 조회 2,137
11년 전 조회 3,169
11년 전 조회 5,839
11년 전 조회 2,964
11년 전 조회 3,179