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

· 11년 전 · 1411


관련파일 : 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,309
11년 전 조회 1,298
11년 전 조회 1,292
11년 전 조회 751
11년 전 조회 1,149
11년 전 조회 1,486
11년 전 조회 1,453
11년 전 조회 822
11년 전 조회 1,171
11년 전 조회 937
11년 전 조회 1,693
11년 전 조회 1,334
11년 전 조회 714
11년 전 조회 2,141
11년 전 조회 6,611
11년 전 조회 1,273
11년 전 조회 1,119
11년 전 조회 1,051
11년 전 조회 909
11년 전 조회 1,441
11년 전 조회 835
11년 전 조회 3,400
11년 전 조회 1,242
11년 전 조회 1,633
11년 전 조회 1,009
11년 전 조회 2,642
11년 전 조회 1,278
11년 전 조회 2,565
11년 전 조회 1,927
11년 전 조회 2,441
11년 전 조회 1,388
11년 전 조회 2,521
11년 전 조회 1,335
11년 전 조회 1,024
11년 전 조회 1,032
11년 전 조회 5,411
11년 전 조회 1,216
11년 전 조회 780
11년 전 조회 748
11년 전 조회 1,104
11년 전 조회 1,450
11년 전 조회 1,866
11년 전 조회 2,175
11년 전 조회 1,080
11년 전 조회 1,406
11년 전 조회 1,343
11년 전 조회 984
11년 전 조회 742
11년 전 조회 2,168
11년 전 조회 1,412
11년 전 조회 3,247
11년 전 조회 1,149
11년 전 조회 1,007
11년 전 조회 2,090
11년 전 조회 2,743
11년 전 조회 2,105
11년 전 조회 3,140
11년 전 조회 1,524
11년 전 조회 3,272
11년 전 조회 788
11년 전 조회 1,088
11년 전 조회 1,957
11년 전 조회 2,306
11년 전 조회 1,009
11년 전 조회 2,823
11년 전 조회 3,021
11년 전 조회 1,525
11년 전 조회 2,197
11년 전 조회 1,047
11년 전 조회 1,399
11년 전 조회 1,075
11년 전 조회 2,269
11년 전 조회 2,187
11년 전 조회 1,169
11년 전 조회 5,297
11년 전 조회 2,344
11년 전 조회 3,064
11년 전 조회 1,913
11년 전 조회 954
11년 전 조회 2,028
11년 전 조회 2,163
11년 전 조회 1,873
11년 전 조회 1,485
11년 전 조회 950
11년 전 조회 1,839
11년 전 조회 2,567
11년 전 조회 1,291
11년 전 조회 2,780
11년 전 조회 1,725
11년 전 조회 4,478
11년 전 조회 1,848
11년 전 조회 2,502
11년 전 조회 3,719
11년 전 조회 1,591
11년 전 조회 2,455
11년 전 조회 819
11년 전 조회 1,849
11년 전 조회 4,484
11년 전 조회 1,606
11년 전 조회 1,865
🐛 버그신고