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

· 11년 전 · 1602


관련파일 : 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,504
11년 전 조회 1,514
11년 전 조회 1,498
11년 전 조회 959
11년 전 조회 1,352
11년 전 조회 1,666
11년 전 조회 1,652
11년 전 조회 996
11년 전 조회 1,361
11년 전 조회 1,149
11년 전 조회 1,898
11년 전 조회 1,546
11년 전 조회 930
11년 전 조회 2,324
11년 전 조회 6,821
11년 전 조회 1,452
11년 전 조회 1,342
11년 전 조회 1,232
11년 전 조회 1,116
11년 전 조회 1,659
11년 전 조회 1,010
11년 전 조회 3,602
11년 전 조회 1,449
11년 전 조회 1,825
11년 전 조회 1,216
11년 전 조회 2,845
11년 전 조회 1,471
11년 전 조회 2,751
11년 전 조회 2,117
11년 전 조회 2,637
11년 전 조회 1,593
11년 전 조회 2,717
11년 전 조회 1,533
11년 전 조회 1,237
11년 전 조회 1,217
11년 전 조회 5,578
11년 전 조회 1,433
11년 전 조회 988
11년 전 조회 925
11년 전 조회 1,324
11년 전 조회 1,651
11년 전 조회 2,082
11년 전 조회 2,399
11년 전 조회 1,302
11년 전 조회 1,615
11년 전 조회 1,553
11년 전 조회 1,166
11년 전 조회 967
11년 전 조회 2,359
11년 전 조회 1,603
11년 전 조회 3,428
11년 전 조회 1,373
11년 전 조회 1,206
11년 전 조회 2,303
11년 전 조회 2,952
11년 전 조회 2,300
11년 전 조회 3,341
11년 전 조회 1,731
11년 전 조회 3,473
11년 전 조회 994
11년 전 조회 1,298
11년 전 조회 2,152
11년 전 조회 2,482
11년 전 조회 1,145
11년 전 조회 3,007
11년 전 조회 3,177
11년 전 조회 1,740
11년 전 조회 2,405
11년 전 조회 1,245
11년 전 조회 1,583
11년 전 조회 1,284
11년 전 조회 2,491
11년 전 조회 2,383
11년 전 조회 1,358
11년 전 조회 5,491
11년 전 조회 2,535
11년 전 조회 3,255
11년 전 조회 2,112
11년 전 조회 1,156
11년 전 조회 2,215
11년 전 조회 2,366
11년 전 조회 2,049
11년 전 조회 1,657
11년 전 조회 1,165
11년 전 조회 2,031
11년 전 조회 2,788
11년 전 조회 1,484
11년 전 조회 2,997
11년 전 조회 1,940
11년 전 조회 4,695
11년 전 조회 2,029
11년 전 조회 2,692
11년 전 조회 3,916
11년 전 조회 1,798
11년 전 조회 2,638
11년 전 조회 1,017
11년 전 조회 2,047
11년 전 조회 4,682
11년 전 조회 1,828
11년 전 조회 2,056
🐛 버그신고