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

· 11년 전 · 2814


관련파일 : 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,711
11년 전 조회 2,724
11년 전 조회 2,697
11년 전 조회 2,162
11년 전 조회 2,556
11년 전 조회 2,909
11년 전 조회 2,848
11년 전 조회 2,194
11년 전 조회 2,563
11년 전 조회 2,340
11년 전 조회 3,064
11년 전 조회 2,714
11년 전 조회 2,068
11년 전 조회 3,475
11년 전 조회 7,983
11년 전 조회 2,613
11년 전 조회 2,494
11년 전 조회 2,366
11년 전 조회 2,246
11년 전 조회 2,805
11년 전 조회 2,189
11년 전 조회 4,764
11년 전 조회 2,602
11년 전 조회 2,990
11년 전 조회 2,338
11년 전 조회 3,888
11년 전 조회 2,651
11년 전 조회 3,997
11년 전 조회 3,328
11년 전 조회 3,818
11년 전 조회 2,827
11년 전 조회 3,923
11년 전 조회 2,738
11년 전 조회 2,441
11년 전 조회 2,418
11년 전 조회 6,811
11년 전 조회 2,621
11년 전 조회 2,166
11년 전 조회 2,131
11년 전 조회 2,499
11년 전 조회 2,860
11년 전 조회 3,301
11년 전 조회 3,594
11년 전 조회 2,529
11년 전 조회 2,791
11년 전 조회 2,756
11년 전 조회 2,357
11년 전 조회 2,175
11년 전 조회 3,549
11년 전 조회 2,815
11년 전 조회 4,638
11년 전 조회 2,555
11년 전 조회 2,448
11년 전 조회 3,497
11년 전 조회 4,166
11년 전 조회 3,510
11년 전 조회 4,551
11년 전 조회 2,929
11년 전 조회 4,685
11년 전 조회 2,214
11년 전 조회 2,502
11년 전 조회 3,338
11년 전 조회 3,696
11년 전 조회 2,298
11년 전 조회 4,233
11년 전 조회 4,408
11년 전 조회 2,936
11년 전 조회 3,629
11년 전 조회 2,487
11년 전 조회 2,800
11년 전 조회 2,496
11년 전 조회 3,722
11년 전 조회 3,588
11년 전 조회 2,631
11년 전 조회 6,720
11년 전 조회 3,806
11년 전 조회 4,511
11년 전 조회 3,358
11년 전 조회 2,390
11년 전 조회 3,468
11년 전 조회 3,605
11년 전 조회 3,298
11년 전 조회 2,925
11년 전 조회 2,394
11년 전 조회 3,272
11년 전 조회 4,021
11년 전 조회 2,721
11년 전 조회 4,242
11년 전 조회 3,189
11년 전 조회 6,023
11년 전 조회 3,268
11년 전 조회 3,944
11년 전 조회 5,169
11년 전 조회 3,065
11년 전 조회 3,896
11년 전 조회 2,252
11년 전 조회 3,299
11년 전 조회 5,955
11년 전 조회 3,099
11년 전 조회 3,292