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

· 11년 전 · 1435


관련파일 : 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,336
11년 전 조회 1,321
11년 전 조회 1,321
11년 전 조회 773
11년 전 조회 1,179
11년 전 조회 1,513
11년 전 조회 1,473
11년 전 조회 846
11년 전 조회 1,197
11년 전 조회 959
11년 전 조회 1,721
11년 전 조회 1,354
11년 전 조회 737
11년 전 조회 2,165
11년 전 조회 6,635
11년 전 조회 1,293
11년 전 조회 1,137
11년 전 조회 1,069
11년 전 조회 934
11년 전 조회 1,463
11년 전 조회 862
11년 전 조회 3,429
11년 전 조회 1,266
11년 전 조회 1,658
11년 전 조회 1,033
11년 전 조회 2,669
11년 전 조회 1,303
11년 전 조회 2,591
11년 전 조회 1,950
11년 전 조회 2,469
11년 전 조회 1,413
11년 전 조회 2,543
11년 전 조회 1,359
11년 전 조회 1,047
11년 전 조회 1,055
11년 전 조회 5,431
11년 전 조회 1,241
11년 전 조회 803
11년 전 조회 768
11년 전 조회 1,123
11년 전 조회 1,470
11년 전 조회 1,890
11년 전 조회 2,198
11년 전 조회 1,102
11년 전 조회 1,428
11년 전 조회 1,367
11년 전 조회 1,007
11년 전 조회 765
11년 전 조회 2,193
11년 전 조회 1,436
11년 전 조회 3,269
11년 전 조회 1,172
11년 전 조회 1,024
11년 전 조회 2,107
11년 전 조회 2,763
11년 전 조회 2,125
11년 전 조회 3,160
11년 전 조회 1,549
11년 전 조회 3,290
11년 전 조회 811
11년 전 조회 1,108
11년 전 조회 1,984
11년 전 조회 2,325
11년 전 조회 1,013
11년 전 조회 2,844
11년 전 조회 3,031
11년 전 조회 1,546
11년 전 조회 2,220
11년 전 조회 1,069
11년 전 조회 1,417
11년 전 조회 1,099
11년 전 조회 2,289
11년 전 조회 2,203
11년 전 조회 1,184
11년 전 조회 5,319
11년 전 조회 2,371
11년 전 조회 3,078
11년 전 조회 1,927
11년 전 조회 974
11년 전 조회 2,049
11년 전 조회 2,183
11년 전 조회 1,888
11년 전 조회 1,498
11년 전 조회 971
11년 전 조회 1,862
11년 전 조회 2,586
11년 전 조회 1,318
11년 전 조회 2,797
11년 전 조회 1,743
11년 전 조회 4,501
11년 전 조회 1,869
11년 전 조회 2,525
11년 전 조회 3,741
11년 전 조회 1,609
11년 전 조회 2,472
11년 전 조회 836
11년 전 조회 1,869
11년 전 조회 4,505
11년 전 조회 1,627
11년 전 조회 1,883
🐛 버그신고