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

· 11년 전 · 2834


관련파일 : 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,735
11년 전 조회 2,755
11년 전 조회 2,719
11년 전 조회 2,188
11년 전 조회 2,583
11년 전 조회 2,935
11년 전 조회 2,885
11년 전 조회 2,218
11년 전 조회 2,587
11년 전 조회 2,363
11년 전 조회 3,090
11년 전 조회 2,742
11년 전 조회 2,088
11년 전 조회 3,507
11년 전 조회 8,009
11년 전 조회 2,635
11년 전 조회 2,517
11년 전 조회 2,382
11년 전 조회 2,273
11년 전 조회 2,829
11년 전 조회 2,207
11년 전 조회 4,781
11년 전 조회 2,630
11년 전 조회 3,006
11년 전 조회 2,357
11년 전 조회 3,906
11년 전 조회 2,671
11년 전 조회 4,030
11년 전 조회 3,352
11년 전 조회 3,845
11년 전 조회 2,848
11년 전 조회 3,946
11년 전 조회 2,760
11년 전 조회 2,464
11년 전 조회 2,437
11년 전 조회 6,828
11년 전 조회 2,644
11년 전 조회 2,192
11년 전 조회 2,152
11년 전 조회 2,524
11년 전 조회 2,890
11년 전 조회 3,321
11년 전 조회 3,619
11년 전 조회 2,562
11년 전 조회 2,810
11년 전 조회 2,769
11년 전 조회 2,376
11년 전 조회 2,195
11년 전 조회 3,572
11년 전 조회 2,835
11년 전 조회 4,669
11년 전 조회 2,577
11년 전 조회 2,471
11년 전 조회 3,520
11년 전 조회 4,186
11년 전 조회 3,535
11년 전 조회 4,575
11년 전 조회 2,954
11년 전 조회 4,704
11년 전 조회 2,236
11년 전 조회 2,524
11년 전 조회 3,371
11년 전 조회 3,719
11년 전 조회 2,320
11년 전 조회 4,256
11년 전 조회 4,435
11년 전 조회 2,961
11년 전 조회 3,649
11년 전 조회 2,509
11년 전 조회 2,826
11년 전 조회 2,525
11년 전 조회 3,750
11년 전 조회 3,610
11년 전 조회 2,651
11년 전 조회 6,746
11년 전 조회 3,832
11년 전 조회 4,537
11년 전 조회 3,384
11년 전 조회 2,415
11년 전 조회 3,494
11년 전 조회 3,630
11년 전 조회 3,320
11년 전 조회 2,948
11년 전 조회 2,422
11년 전 조회 3,295
11년 전 조회 4,052
11년 전 조회 2,742
11년 전 조회 4,259
11년 전 조회 3,201
11년 전 조회 6,047
11년 전 조회 3,295
11년 전 조회 3,963
11년 전 조회 5,184
11년 전 조회 3,084
11년 전 조회 3,917
11년 전 조회 2,266
11년 전 조회 3,320
11년 전 조회 5,969
11년 전 조회 3,122
11년 전 조회 3,312