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

· 11년 전 · 1416


관련파일 : 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,301
11년 전 조회 1,295
11년 전 조회 754
11년 전 조회 1,151
11년 전 조회 1,487
11년 전 조회 1,456
11년 전 조회 824
11년 전 조회 1,177
11년 전 조회 943
11년 전 조회 1,694
11년 전 조회 1,336
11년 전 조회 714
11년 전 조회 2,141
11년 전 조회 6,618
11년 전 조회 1,274
11년 전 조회 1,123
11년 전 조회 1,051
11년 전 조회 913
11년 전 조회 1,449
11년 전 조회 839
11년 전 조회 3,405
11년 전 조회 1,245
11년 전 조회 1,635
11년 전 조회 1,009
11년 전 조회 2,647
11년 전 조회 1,282
11년 전 조회 2,569
11년 전 조회 1,932
11년 전 조회 2,442
11년 전 조회 1,392
11년 전 조회 2,524
11년 전 조회 1,339
11년 전 조회 1,027
11년 전 조회 1,033
11년 전 조회 5,413
11년 전 조회 1,220
11년 전 조회 783
11년 전 조회 749
11년 전 조회 1,107
11년 전 조회 1,452
11년 전 조회 1,866
11년 전 조회 2,178
11년 전 조회 1,082
11년 전 조회 1,406
11년 전 조회 1,348
11년 전 조회 987
11년 전 조회 746
11년 전 조회 2,170
11년 전 조회 1,417
11년 전 조회 3,250
11년 전 조회 1,151
11년 전 조회 1,012
11년 전 조회 2,095
11년 전 조회 2,749
11년 전 조회 2,108
11년 전 조회 3,141
11년 전 조회 1,530
11년 전 조회 3,272
11년 전 조회 790
11년 전 조회 1,091
11년 전 조회 1,961
11년 전 조회 2,307
11년 전 조회 1,011
11년 전 조회 2,826
11년 전 조회 3,021
11년 전 조회 1,528
11년 전 조회 2,200
11년 전 조회 1,049
11년 전 조회 1,402
11년 전 조회 1,078
11년 전 조회 2,272
11년 전 조회 2,190
11년 전 조회 1,170
11년 전 조회 5,303
11년 전 조회 2,349
11년 전 조회 3,066
11년 전 조회 1,914
11년 전 조회 958
11년 전 조회 2,031
11년 전 조회 2,165
11년 전 조회 1,875
11년 전 조회 1,486
11년 전 조회 953
11년 전 조회 1,845
11년 전 조회 2,572
11년 전 조회 1,295
11년 전 조회 2,785
11년 전 조회 1,728
11년 전 조회 4,481
11년 전 조회 1,851
11년 전 조회 2,505
11년 전 조회 3,723
11년 전 조회 1,594
11년 전 조회 2,455
11년 전 조회 823
11년 전 조회 1,852
11년 전 조회 4,488
11년 전 조회 1,612
11년 전 조회 1,867
🐛 버그신고