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

· 11년 전 · 2877


관련파일 : 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,771
11년 전 조회 2,797
11년 전 조회 2,771
11년 전 조회 2,240
11년 전 조회 2,623
11년 전 조회 2,978
11년 전 조회 2,928
11년 전 조회 2,255
11년 전 조회 2,627
11년 전 조회 2,400
11년 전 조회 3,140
11년 전 조회 2,768
11년 전 조회 2,128
11년 전 조회 3,550
11년 전 조회 8,056
11년 전 조회 2,680
11년 전 조회 2,556
11년 전 조회 2,425
11년 전 조회 2,313
11년 전 조회 2,873
11년 전 조회 2,249
11년 전 조회 4,824
11년 전 조회 2,676
11년 전 조회 3,048
11년 전 조회 2,404
11년 전 조회 3,951
11년 전 조회 2,722
11년 전 조회 4,078
11년 전 조회 3,393
11년 전 조회 3,882
11년 전 조회 2,893
11년 전 조회 3,992
11년 전 조회 2,815
11년 전 조회 2,513
11년 전 조회 2,484
11년 전 조회 6,868
11년 전 조회 2,692
11년 전 조회 2,237
11년 전 조회 2,201
11년 전 조회 2,564
11년 전 조회 2,933
11년 전 조회 3,369
11년 전 조회 3,660
11년 전 조회 2,604
11년 전 조회 2,859
11년 전 조회 2,812
11년 전 조회 2,413
11년 전 조회 2,246
11년 전 조회 3,627
11년 전 조회 2,878
11년 전 조회 4,703
11년 전 조회 2,623
11년 전 조회 2,524
11년 전 조회 3,572
11년 전 조회 4,228
11년 전 조회 3,584
11년 전 조회 4,616
11년 전 조회 2,990
11년 전 조회 4,756
11년 전 조회 2,276
11년 전 조회 2,561
11년 전 조회 3,409
11년 전 조회 3,756
11년 전 조회 2,364
11년 전 조회 4,296
11년 전 조회 4,477
11년 전 조회 3,004
11년 전 조회 3,681
11년 전 조회 2,548
11년 전 조회 2,854
11년 전 조회 2,559
11년 전 조회 3,783
11년 전 조회 3,637
11년 전 조회 2,679
11년 전 조회 6,782
11년 전 조회 3,861
11년 전 조회 4,578
11년 전 조회 3,421
11년 전 조회 2,447
11년 전 조회 3,530
11년 전 조회 3,660
11년 전 조회 3,340
11년 전 조회 2,971
11년 전 조회 2,448
11년 전 조회 3,328
11년 전 조회 4,089
11년 전 조회 2,772
11년 전 조회 4,301
11년 전 조회 3,232
11년 전 조회 6,083
11년 전 조회 3,333
11년 전 조회 4,005
11년 전 조회 5,220
11년 전 조회 3,119
11년 전 조회 3,956
11년 전 조회 2,296
11년 전 조회 3,359
11년 전 조회 6,004
11년 전 조회 3,166
11년 전 조회 3,352