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

· 11년 전 · 1419


관련파일 : 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,302
11년 전 조회 1,297
11년 전 조회 755
11년 전 조회 1,154
11년 전 조회 1,490
11년 전 조회 1,458
11년 전 조회 826
11년 전 조회 1,178
11년 전 조회 944
11년 전 조회 1,698
11년 전 조회 1,340
11년 전 조회 716
11년 전 조회 2,142
11년 전 조회 6,618
11년 전 조회 1,276
11년 전 조회 1,124
11년 전 조회 1,054
11년 전 조회 915
11년 전 조회 1,450
11년 전 조회 841
11년 전 조회 3,406
11년 전 조회 1,248
11년 전 조회 1,639
11년 전 조회 1,009
11년 전 조회 2,650
11년 전 조회 1,283
11년 전 조회 2,571
11년 전 조회 1,936
11년 전 조회 2,446
11년 전 조회 1,393
11년 전 조회 2,527
11년 전 조회 1,340
11년 전 조회 1,028
11년 전 조회 1,035
11년 전 조회 5,415
11년 전 조회 1,221
11년 전 조회 784
11년 전 조회 750
11년 전 조회 1,110
11년 전 조회 1,452
11년 전 조회 1,868
11년 전 조회 2,180
11년 전 조회 1,083
11년 전 조회 1,407
11년 전 조회 1,350
11년 전 조회 990
11년 전 조회 747
11년 전 조회 2,172
11년 전 조회 1,420
11년 전 조회 3,251
11년 전 조회 1,154
11년 전 조회 1,012
11년 전 조회 2,097
11년 전 조회 2,750
11년 전 조회 2,110
11년 전 조회 3,142
11년 전 조회 1,532
11년 전 조회 3,272
11년 전 조회 791
11년 전 조회 1,092
11년 전 조회 1,966
11년 전 조회 2,308
11년 전 조회 1,011
11년 전 조회 2,828
11년 전 조회 3,022
11년 전 조회 1,528
11년 전 조회 2,200
11년 전 조회 1,050
11년 전 조회 1,402
11년 전 조회 1,081
11년 전 조회 2,273
11년 전 조회 2,190
11년 전 조회 1,171
11년 전 조회 5,305
11년 전 조회 2,351
11년 전 조회 3,067
11년 전 조회 1,914
11년 전 조회 960
11년 전 조회 2,033
11년 전 조회 2,166
11년 전 조회 1,876
11년 전 조회 1,488
11년 전 조회 954
11년 전 조회 1,848
11년 전 조회 2,572
11년 전 조회 1,297
11년 전 조회 2,787
11년 전 조회 1,730
11년 전 조회 4,484
11년 전 조회 1,852
11년 전 조회 2,507
11년 전 조회 3,727
11년 전 조회 1,595
11년 전 조회 2,457
11년 전 조회 823
11년 전 조회 1,852
11년 전 조회 4,489
11년 전 조회 1,613
11년 전 조회 1,870
🐛 버그신고