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

· 11년 전 · 2940


관련파일 : 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,836
11년 전 조회 2,855
11년 전 조회 2,833
11년 전 조회 2,292
11년 전 조회 2,697
11년 전 조회 3,049
11년 전 조회 2,991
11년 전 조회 2,316
11년 전 조회 2,677
11년 전 조회 2,467
11년 전 조회 3,197
11년 전 조회 2,835
11년 전 조회 2,193
11년 전 조회 3,595
11년 전 조회 8,117
11년 전 조회 2,739
11년 전 조회 2,620
11년 전 조회 2,485
11년 전 조회 2,373
11년 전 조회 2,934
11년 전 조회 2,300
11년 전 조회 4,882
11년 전 조회 2,729
11년 전 조회 3,101
11년 전 조회 2,462
11년 전 조회 4,006
11년 전 조회 2,793
11년 전 조회 4,146
11년 전 조회 3,461
11년 전 조회 3,948
11년 전 조회 2,958
11년 전 조회 4,042
11년 전 조회 2,885
11년 전 조회 2,574
11년 전 조회 2,550
11년 전 조회 6,927
11년 전 조회 2,748
11년 전 조회 2,294
11년 전 조회 2,248
11년 전 조회 2,640
11년 전 조회 2,996
11년 전 조회 3,425
11년 전 조회 3,737
11년 전 조회 2,671
11년 전 조회 2,921
11년 전 조회 2,880
11년 전 조회 2,484
11년 전 조회 2,299
11년 전 조회 3,683
11년 전 조회 2,941
11년 전 조회 4,761
11년 전 조회 2,684
11년 전 조회 2,596
11년 전 조회 3,634
11년 전 조회 4,297
11년 전 조회 3,637
11년 전 조회 4,667
11년 전 조회 3,058
11년 전 조회 4,822
11년 전 조회 2,347
11년 전 조회 2,641
11년 전 조회 3,454
11년 전 조회 3,809
11년 전 조회 2,415
11년 전 조회 4,347
11년 전 조회 4,512
11년 전 조회 3,066
11년 전 조회 3,735
11년 전 조회 2,600
11년 전 조회 2,899
11년 전 조회 2,609
11년 전 조회 3,821
11년 전 조회 3,689
11년 전 조회 2,731
11년 전 조회 6,833
11년 전 조회 3,917
11년 전 조회 4,632
11년 전 조회 3,468
11년 전 조회 2,501
11년 전 조회 3,584
11년 전 조회 3,709
11년 전 조회 3,391
11년 전 조회 3,018
11년 전 조회 2,500
11년 전 조회 3,372
11년 전 조회 4,156
11년 전 조회 2,829
11년 전 조회 4,346
11년 전 조회 3,288
11년 전 조회 6,134
11년 전 조회 3,381
11년 전 조회 4,046
11년 전 조회 5,277
11년 전 조회 3,167
11년 전 조회 4,007
11년 전 조회 2,345
11년 전 조회 3,417
11년 전 조회 6,061
11년 전 조회 3,219
11년 전 조회 3,390