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

· 11년 전 · 2849


관련파일 : 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,744
11년 전 조회 2,770
11년 전 조회 2,737
11년 전 조회 2,202
11년 전 조회 2,593
11년 전 조회 2,947
11년 전 조회 2,894
11년 전 조회 2,226
11년 전 조회 2,600
11년 전 조회 2,372
11년 전 조회 3,113
11년 전 조회 2,751
11년 전 조회 2,101
11년 전 조회 3,527
11년 전 조회 8,021
11년 전 조회 2,655
11년 전 조회 2,538
11년 전 조회 2,402
11년 전 조회 2,286
11년 전 조회 2,843
11년 전 조회 2,222
11년 전 조회 4,793
11년 전 조회 2,651
11년 전 조회 3,023
11년 전 조회 2,376
11년 전 조회 3,928
11년 전 조회 2,689
11년 전 조회 4,043
11년 전 조회 3,364
11년 전 조회 3,856
11년 전 조회 2,862
11년 전 조회 3,961
11년 전 조회 2,776
11년 전 조회 2,480
11년 전 조회 2,452
11년 전 조회 6,844
11년 전 조회 2,663
11년 전 조회 2,208
11년 전 조회 2,166
11년 전 조회 2,541
11년 전 조회 2,907
11년 전 조회 3,339
11년 전 조회 3,633
11년 전 조회 2,571
11년 전 조회 2,823
11년 전 조회 2,778
11년 전 조회 2,386
11년 전 조회 2,207
11년 전 조회 3,587
11년 전 조회 2,850
11년 전 조회 4,677
11년 전 조회 2,595
11년 전 조회 2,494
11년 전 조회 3,538
11년 전 조회 4,198
11년 전 조회 3,554
11년 전 조회 4,585
11년 전 조회 2,965
11년 전 조회 4,731
11년 전 조회 2,245
11년 전 조회 2,535
11년 전 조회 3,381
11년 전 조회 3,732
11년 전 조회 2,331
11년 전 조회 4,266
11년 전 조회 4,441
11년 전 조회 2,979
11년 전 조회 3,659
11년 전 조회 2,524
11년 전 조회 2,833
11년 전 조회 2,539
11년 전 조회 3,760
11년 전 조회 3,621
11년 전 조회 2,657
11년 전 조회 6,758
11년 전 조회 3,843
11년 전 조회 4,549
11년 전 조회 3,396
11년 전 조회 2,422
11년 전 조회 3,503
11년 전 조회 3,641
11년 전 조회 3,324
11년 전 조회 2,953
11년 전 조회 2,425
11년 전 조회 3,304
11년 전 조회 4,065
11년 전 조회 2,749
11년 전 조회 4,278
11년 전 조회 3,211
11년 전 조회 6,060
11년 전 조회 3,307
11년 전 조회 3,978
11년 전 조회 5,192
11년 전 조회 3,095
11년 전 조회 3,933
11년 전 조회 2,277
11년 전 조회 3,334
11년 전 조회 5,984
11년 전 조회 3,137
11년 전 조회 3,324