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

· 11년 전 · 1538


관련파일 : 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,431
11년 전 조회 1,429
11년 전 조회 1,424
11년 전 조회 878
11년 전 조회 1,279
11년 전 조회 1,612
11년 전 조회 1,572
11년 전 조회 941
11년 전 조회 1,289
11년 전 조회 1,060
11년 전 조회 1,821
11년 전 조회 1,460
11년 전 조회 845
11년 전 조회 2,274
11년 전 조회 6,732
11년 전 조회 1,394
11년 전 조회 1,244
11년 전 조회 1,178
11년 전 조회 1,039
11년 전 조회 1,571
11년 전 조회 954
11년 전 조회 3,530
11년 전 조회 1,368
11년 전 조회 1,772
11년 전 조회 1,138
11년 전 조회 2,771
11년 전 조회 1,408
11년 전 조회 2,689
11년 전 조회 2,058
11년 전 조회 2,575
11년 전 조회 1,522
11년 전 조회 2,651
11년 전 조회 1,452
11년 전 조회 1,151
11년 전 조회 1,155
11년 전 조회 5,537
11년 전 조회 1,361
11년 전 조회 904
11년 전 조회 867
11년 전 조회 1,236
11년 전 조회 1,571
11년 전 조회 2,002
11년 전 조회 2,303
11년 전 조회 1,214
11년 전 조회 1,525
11년 전 조회 1,469
11년 전 조회 1,111
11년 전 조회 878
11년 전 조회 2,296
11년 전 조회 1,539
11년 전 조회 3,369
11년 전 조회 1,284
11년 전 조회 1,120
11년 전 조회 2,223
11년 전 조회 2,868
11년 전 조회 2,228
11년 전 조회 3,274
11년 전 조회 1,656
11년 전 조회 3,396
11년 전 조회 914
11년 전 조회 1,206
11년 전 조회 2,089
11년 전 조회 2,428
11년 전 조회 1,102
11년 전 조회 2,936
11년 전 조회 3,119
11년 전 조회 1,656
11년 전 조회 2,319
11년 전 조회 1,178
11년 전 조회 1,513
11년 전 조회 1,193
11년 전 조회 2,396
11년 전 조회 2,303
11년 전 조회 1,288
11년 전 조회 5,422
11년 전 조회 2,465
11년 전 조회 3,183
11년 전 조회 2,029
11년 전 조회 1,075
11년 전 조회 2,142
11년 전 조회 2,283
11년 전 조회 1,991
11년 전 조회 1,597
11년 전 조회 1,084
11년 전 조회 1,962
11년 전 조회 2,690
11년 전 조회 1,412
11년 전 조회 2,908
11년 전 조회 1,858
11년 전 조회 4,608
11년 전 조회 1,970
11년 전 조회 2,627
11년 전 조회 3,842
11년 전 조회 1,712
11년 전 조회 2,571
11년 전 조회 938
11년 전 조회 1,966
11년 전 조회 4,597
11년 전 조회 1,731
11년 전 조회 1,991
🐛 버그신고