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

· 11년 전 · 2280


관련파일 : 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,158
11년 전 조회 2,136
11년 전 조회 2,140
11년 전 조회 1,611
11년 전 조회 2,014
11년 전 조회 2,351
11년 전 조회 2,272
11년 전 조회 1,625
11년 전 조회 2,020
11년 전 조회 1,793
11년 전 조회 2,501
11년 전 조회 2,155
11년 전 조회 1,539
11년 전 조회 2,931
11년 전 조회 7,394
11년 전 조회 2,049
11년 전 조회 1,918
11년 전 조회 1,812
11년 전 조회 1,703
11년 전 조회 2,210
11년 전 조회 1,625
11년 전 조회 4,193
11년 전 조회 2,036
11년 전 조회 2,427
11년 전 조회 1,807
11년 전 조회 3,359
11년 전 조회 2,146
11년 전 조회 3,412
11년 전 조회 2,814
11년 전 조회 3,283
11년 전 조회 2,287
11년 전 조회 3,378
11년 전 조회 2,196
11년 전 조회 1,907
11년 전 조회 1,888
11년 전 조회 6,253
11년 전 조회 2,058
11년 전 조회 1,619
11년 전 조회 1,591
11년 전 조회 1,954
11년 전 조회 2,298
11년 전 조회 2,735
11년 전 조회 3,032
11년 전 조회 1,933
11년 전 조회 2,237
11년 전 조회 2,173
11년 전 조회 1,830
11년 전 조회 1,577
11년 전 조회 3,012
11년 전 조회 2,281
11년 전 조회 4,087
11년 전 조회 2,020
11년 전 조회 1,866
11년 전 조회 2,941
11년 전 조회 3,584
11년 전 조회 2,946
11년 전 조회 3,974
11년 전 조회 2,374
11년 전 조회 4,158
11년 전 조회 1,656
11년 전 조회 1,943
11년 전 조회 2,803
11년 전 조회 3,157
11년 전 조회 1,756
11년 전 조회 3,666
11년 전 조회 3,834
11년 전 조회 2,386
11년 전 조회 3,049
11년 전 조회 1,905
11년 전 조회 2,246
11년 전 조회 1,947
11년 전 조회 3,157
11년 전 조회 3,025
11년 전 조회 2,017
11년 전 조회 6,184
11년 전 조회 3,340
11년 전 조회 3,986
11년 전 조회 2,820
11년 전 조회 1,802
11년 전 조회 2,890
11년 전 조회 3,056
11년 전 조회 2,745
11년 전 조회 2,356
11년 전 조회 1,790
11년 전 조회 2,725
11년 전 조회 3,498
11년 전 조회 2,167
11년 전 조회 3,687
11년 전 조회 2,619
11년 전 조회 5,417
11년 전 조회 2,731
11년 전 조회 3,390
11년 전 조회 4,634
11년 전 조회 2,494
11년 전 조회 3,345
11년 전 조회 1,711
11년 전 조회 2,758
11년 전 조회 5,404
11년 전 조회 2,506
11년 전 조회 2,738