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

· 11년 전 · 2354


관련파일 : 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년 전 조회 2,226
11년 전 조회 2,203
11년 전 조회 2,230
11년 전 조회 1,689
11년 전 조회 2,093
11년 전 조회 2,443
11년 전 조회 2,350
11년 전 조회 1,712
11년 전 조회 2,089
11년 전 조회 1,866
11년 전 조회 2,579
11년 전 조회 2,218
11년 전 조회 1,602
11년 전 조회 3,009
11년 전 조회 7,468
11년 전 조회 2,119
11년 전 조회 1,997
11년 전 조회 1,890
11년 전 조회 1,774
11년 전 조회 2,284
11년 전 조회 1,717
11년 전 조회 4,271
11년 전 조회 2,103
11년 전 조회 2,503
11년 전 조회 1,874
11년 전 조회 3,427
11년 전 조회 2,218
11년 전 조회 3,503
11년 전 조회 2,896
11년 전 조회 3,358
11년 전 조회 2,365
11년 전 조회 3,449
11년 전 조회 2,276
11년 전 조회 1,981
11년 전 조회 1,976
11년 전 조회 6,344
11년 전 조회 2,134
11년 전 조회 1,701
11년 전 조회 1,673
11년 전 조회 2,033
11년 전 조회 2,378
11년 전 조회 2,819
11년 전 조회 3,115
11년 전 조회 2,025
11년 전 조회 2,321
11년 전 조회 2,245
11년 전 조회 1,893
11년 전 조회 1,661
11년 전 조회 3,103
11년 전 조회 2,355
11년 전 조회 4,164
11년 전 조회 2,089
11년 전 조회 1,931
11년 전 조회 3,015
11년 전 조회 3,670
11년 전 조회 3,026
11년 전 조회 4,061
11년 전 조회 2,457
11년 전 조회 4,225
11년 전 조회 1,726
11년 전 조회 2,016
11년 전 조회 2,880
11년 전 조회 3,228
11년 전 조회 1,846
11년 전 조회 3,744
11년 전 조회 3,927
11년 전 조회 2,468
11년 전 조회 3,126
11년 전 조회 1,985
11년 전 조회 2,327
11년 전 조회 2,019
11년 전 조회 3,230
11년 전 조회 3,084
11년 전 조회 2,097
11년 전 조회 6,256
11년 전 조회 3,392
11년 전 조회 4,058
11년 전 조회 2,892
11년 전 조회 1,868
11년 전 조회 2,963
11년 전 조회 3,129
11년 전 조회 2,810
11년 전 조회 2,443
11년 전 조회 1,862
11년 전 조회 2,809
11년 전 조회 3,579
11년 전 조회 2,248
11년 전 조회 3,762
11년 전 조회 2,718
11년 전 조회 5,531
11년 전 조회 2,820
11년 전 조회 3,472
11년 전 조회 4,705
11년 전 조회 2,579
11년 전 조회 3,430
11년 전 조회 1,790
11년 전 조회 2,838
11년 전 조회 5,464
11년 전 조회 2,589
11년 전 조회 2,818