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

· 11년 전 · 1430


관련파일 : 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,322
11년 전 조회 1,316
11년 전 조회 1,306
11년 전 조회 763
11년 전 조회 1,167
11년 전 조회 1,502
11년 전 조회 1,466
11년 전 조회 837
11년 전 조회 1,186
11년 전 조회 955
11년 전 조회 1,707
11년 전 조회 1,350
11년 전 조회 725
11년 전 조회 2,152
11년 전 조회 6,627
11년 전 조회 1,285
11년 전 조회 1,132
11년 전 조회 1,062
11년 전 조회 925
11년 전 조회 1,456
11년 전 조회 853
11년 전 조회 3,417
11년 전 조회 1,258
11년 전 조회 1,649
11년 전 조회 1,025
11년 전 조회 2,662
11년 전 조회 1,296
11년 전 조회 2,584
11년 전 조회 1,945
11년 전 조회 2,461
11년 전 조회 1,404
11년 전 조회 2,537
11년 전 조회 1,356
11년 전 조회 1,039
11년 전 조회 1,043
11년 전 조회 5,424
11년 전 조회 1,233
11년 전 조회 796
11년 전 조회 760
11년 전 조회 1,119
11년 전 조회 1,463
11년 전 조회 1,880
11년 전 조회 2,192
11년 전 조회 1,096
11년 전 조회 1,421
11년 전 조회 1,360
11년 전 조회 1,003
11년 전 조회 759
11년 전 조회 2,186
11년 전 조회 1,431
11년 전 조회 3,263
11년 전 조회 1,164
11년 전 조회 1,019
11년 전 조회 2,104
11년 전 조회 2,761
11년 전 조회 2,119
11년 전 조회 3,153
11년 전 조회 1,544
11년 전 조회 3,285
11년 전 조회 806
11년 전 조회 1,107
11년 전 조회 1,976
11년 전 조회 2,318
11년 전 조회 1,013
11년 전 조회 2,839
11년 전 조회 3,027
11년 전 조회 1,537
11년 전 조회 2,215
11년 전 조회 1,065
11년 전 조회 1,413
11년 전 조회 1,092
11년 전 조회 2,286
11년 전 조회 2,198
11년 전 조회 1,178
11년 전 조회 5,316
11년 전 조회 2,361
11년 전 조회 3,074
11년 전 조회 1,925
11년 전 조회 971
11년 전 조회 2,042
11년 전 조회 2,175
11년 전 조회 1,885
11년 전 조회 1,496
11년 전 조회 963
11년 전 조회 1,859
11년 전 조회 2,580
11년 전 조회 1,311
11년 전 조회 2,793
11년 전 조회 1,739
11년 전 조회 4,493
11년 전 조회 1,863
11년 전 조회 2,516
11년 전 조회 3,737
11년 전 조회 1,605
11년 전 조회 2,468
11년 전 조회 833
11년 전 조회 1,864
11년 전 조회 4,498
11년 전 조회 1,620
11년 전 조회 1,880
🐛 버그신고