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

· 11년 전 · 2614


관련파일 : 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,473
11년 전 조회 2,473
11년 전 조회 2,479
11년 전 조회 1,926
11년 전 조회 2,327
11년 전 조회 2,693
11년 전 조회 2,588
11년 전 조회 1,978
11년 전 조회 2,340
11년 전 조회 2,108
11년 전 조회 2,836
11년 전 조회 2,492
11년 전 조회 1,848
11년 전 조회 3,249
11년 전 조회 7,756
11년 전 조회 2,393
11년 전 조회 2,249
11년 전 조회 2,152
11년 전 조회 2,019
11년 전 조회 2,566
11년 전 조회 1,976
11년 전 조회 4,524
11년 전 조회 2,367
11년 전 조회 2,750
11년 전 조회 2,097
11년 전 조회 3,670
11년 전 조회 2,453
11년 전 조회 3,775
11년 전 조회 3,120
11년 전 조회 3,604
11년 전 조회 2,624
11년 전 조회 3,709
11년 전 조회 2,517
11년 전 조회 2,230
11년 전 조회 2,237
11년 전 조회 6,611
11년 전 조회 2,405
11년 전 조회 1,950
11년 전 조회 1,924
11년 전 조회 2,273
11년 전 조회 2,638
11년 전 조회 3,071
11년 전 조회 3,398
11년 전 조회 2,292
11년 전 조회 2,572
11년 전 조회 2,525
11년 전 조회 2,144
11년 전 조회 1,928
11년 전 조회 3,351
11년 전 조회 2,615
11년 전 조회 4,414
11년 전 조회 2,356
11년 전 조회 2,211
11년 전 조회 3,281
11년 전 조회 3,920
11년 전 조회 3,272
11년 전 조회 4,317
11년 전 조회 2,713
11년 전 조회 4,472
11년 전 조회 2,007
11년 전 조회 2,284
11년 전 조회 3,131
11년 전 조회 3,485
11년 전 조회 2,099
11년 전 조회 4,005
11년 전 조회 4,202
11년 전 조회 2,696
11년 전 조회 3,401
11년 전 조회 2,247
11년 전 조회 2,574
11년 전 조회 2,278
11년 전 조회 3,488
11년 전 조회 3,354
11년 전 조회 2,380
11년 전 조회 6,506
11년 전 조회 3,587
11년 전 조회 4,285
11년 전 조회 3,135
11년 전 조회 2,155
11년 전 조회 3,237
11년 전 조회 3,397
11년 전 조회 3,071
11년 전 조회 2,708
11년 전 조회 2,140
11년 전 조회 3,069
11년 전 조회 3,831
11년 전 조회 2,523
11년 전 조회 4,022
11년 전 조회 2,982
11년 전 조회 5,780
11년 전 조회 3,058
11년 전 조회 3,744
11년 전 조회 4,956
11년 전 조회 2,824
11년 전 조회 3,671
11년 전 조회 2,033
11년 전 조회 3,065
11년 전 조회 5,723
11년 전 조회 2,846
11년 전 조회 3,071