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

· 11년 전 · 1417


관련파일 : 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,310
11년 전 조회 1,301
11년 전 조회 1,296
11년 전 조회 754
11년 전 조회 1,152
11년 전 조회 1,489
11년 전 조회 1,456
11년 전 조회 825
11년 전 조회 1,178
11년 전 조회 943
11년 전 조회 1,697
11년 전 조회 1,338
11년 전 조회 714
11년 전 조회 2,141
11년 전 조회 6,618
11년 전 조회 1,275
11년 전 조회 1,123
11년 전 조회 1,052
11년 전 조회 914
11년 전 조회 1,450
11년 전 조회 839
11년 전 조회 3,405
11년 전 조회 1,247
11년 전 조회 1,636
11년 전 조회 1,009
11년 전 조회 2,648
11년 전 조회 1,283
11년 전 조회 2,571
11년 전 조회 1,933
11년 전 조회 2,443
11년 전 조회 1,392
11년 전 조회 2,525
11년 전 조회 1,339
11년 전 조회 1,027
11년 전 조회 1,033
11년 전 조회 5,414
11년 전 조회 1,220
11년 전 조회 784
11년 전 조회 749
11년 전 조회 1,109
11년 전 조회 1,452
11년 전 조회 1,868
11년 전 조회 2,179
11년 전 조회 1,083
11년 전 조회 1,407
11년 전 조회 1,349
11년 전 조회 990
11년 전 조회 747
11년 전 조회 2,171
11년 전 조회 1,418
11년 전 조회 3,251
11년 전 조회 1,153
11년 전 조회 1,012
11년 전 조회 2,097
11년 전 조회 2,750
11년 전 조회 2,109
11년 전 조회 3,142
11년 전 조회 1,532
11년 전 조회 3,272
11년 전 조회 791
11년 전 조회 1,092
11년 전 조회 1,963
11년 전 조회 2,308
11년 전 조회 1,011
11년 전 조회 2,827
11년 전 조회 3,022
11년 전 조회 1,528
11년 전 조회 2,200
11년 전 조회 1,049
11년 전 조회 1,402
11년 전 조회 1,080
11년 전 조회 2,273
11년 전 조회 2,190
11년 전 조회 1,171
11년 전 조회 5,304
11년 전 조회 2,349
11년 전 조회 3,066
11년 전 조회 1,914
11년 전 조회 958
11년 전 조회 2,031
11년 전 조회 2,166
11년 전 조회 1,875
11년 전 조회 1,488
11년 전 조회 954
11년 전 조회 1,847
11년 전 조회 2,572
11년 전 조회 1,296
11년 전 조회 2,786
11년 전 조회 1,730
11년 전 조회 4,483
11년 전 조회 1,851
11년 전 조회 2,505
11년 전 조회 3,726
11년 전 조회 1,594
11년 전 조회 2,455
11년 전 조회 823
11년 전 조회 1,852
11년 전 조회 4,489
11년 전 조회 1,613
11년 전 조회 1,870
🐛 버그신고