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

· 11년 전 · 1767


관련파일 : 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,642
11년 전 조회 1,650
11년 전 조회 1,637
11년 전 조회 1,096
11년 전 조회 1,479
11년 전 조회 1,824
11년 전 조회 1,795
11년 전 조회 1,147
11년 전 조회 1,509
11년 전 조회 1,298
11년 전 조회 2,034
11년 전 조회 1,680
11년 전 조회 1,077
11년 전 조회 2,465
11년 전 조회 6,969
11년 전 조회 1,596
11년 전 조회 1,489
11년 전 조회 1,375
11년 전 조회 1,247
11년 전 조회 1,783
11년 전 조회 1,162
11년 전 조회 3,757
11년 전 조회 1,585
11년 전 조회 1,967
11년 전 조회 1,355
11년 전 조회 2,980
11년 전 조회 1,635
11년 전 조회 2,904
11년 전 조회 2,276
11년 전 조회 2,778
11년 전 조회 1,751
11년 전 조회 2,852
11년 전 조회 1,687
11년 전 조회 1,390
11년 전 조회 1,355
11년 전 조회 5,729
11년 전 조회 1,575
11년 전 조회 1,126
11년 전 조회 1,067
11년 전 조회 1,468
11년 전 조회 1,798
11년 전 조회 2,224
11년 전 조회 2,538
11년 전 조회 1,430
11년 전 조회 1,749
11년 전 조회 1,696
11년 전 조회 1,317
11년 전 조회 1,111
11년 전 조회 2,510
11년 전 조회 1,768
11년 전 조회 3,589
11년 전 조회 1,523
11년 전 조회 1,361
11년 전 조회 2,435
11년 전 조회 3,078
11년 전 조회 2,440
11년 전 조회 3,485
11년 전 조회 1,888
11년 전 조회 3,629
11년 전 조회 1,147
11년 전 조회 1,453
11년 전 조회 2,302
11년 전 조회 2,634
11년 전 조회 1,274
11년 전 조회 3,164
11년 전 조회 3,320
11년 전 조회 1,879
11년 전 조회 2,552
11년 전 조회 1,396
11년 전 조회 1,746
11년 전 조회 1,422
11년 전 조회 2,646
11년 전 조회 2,524
11년 전 조회 1,510
11년 전 조회 5,646
11년 전 조회 2,694
11년 전 조회 3,420
11년 전 조회 2,266
11년 전 조회 1,292
11년 전 조회 2,367
11년 전 조회 2,534
11년 전 조회 2,201
11년 전 조회 1,813
11년 전 조회 1,310
11년 전 조회 2,183
11년 전 조회 2,955
11년 전 조회 1,645
11년 전 조회 3,149
11년 전 조회 2,094
11년 전 조회 4,852
11년 전 조회 2,187
11년 전 조회 2,847
11년 전 조회 4,078
11년 전 조회 1,948
11년 전 조회 2,801
11년 전 조회 1,171
11년 전 조회 2,203
11년 전 조회 4,847
11년 전 조회 1,967
11년 전 조회 2,209