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

· 11년 전 · 2994


관련파일 : 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,895
11년 전 조회 2,904
11년 전 조회 2,886
11년 전 조회 2,348
11년 전 조회 2,751
11년 전 조회 3,098
11년 전 조회 3,046
11년 전 조회 2,355
11년 전 조회 2,723
11년 전 조회 2,512
11년 전 조회 3,252
11년 전 조회 2,884
11년 전 조회 2,246
11년 전 조회 3,642
11년 전 조회 8,165
11년 전 조회 2,790
11년 전 조회 2,654
11년 전 조회 2,538
11년 전 조회 2,427
11년 전 조회 2,991
11년 전 조회 2,343
11년 전 조회 4,927
11년 전 조회 2,772
11년 전 조회 3,145
11년 전 조회 2,507
11년 전 조회 4,050
11년 전 조회 2,838
11년 전 조회 4,184
11년 전 조회 3,493
11년 전 조회 4,004
11년 전 조회 2,999
11년 전 조회 4,096
11년 전 조회 2,934
11년 전 조회 2,625
11년 전 조회 2,604
11년 전 조회 6,968
11년 전 조회 2,807
11년 전 조회 2,345
11년 전 조회 2,300
11년 전 조회 2,687
11년 전 조회 3,038
11년 전 조회 3,469
11년 전 조회 3,788
11년 전 조회 2,714
11년 전 조회 2,974
11년 전 조회 2,931
11년 전 조회 2,534
11년 전 조회 2,352
11년 전 조회 3,735
11년 전 조회 2,995
11년 전 조회 4,809
11년 전 조회 2,732
11년 전 조회 2,645
11년 전 조회 3,684
11년 전 조회 4,357
11년 전 조회 3,683
11년 전 조회 4,712
11년 전 조회 3,110
11년 전 조회 4,876
11년 전 조회 2,399
11년 전 조회 2,687
11년 전 조회 3,506
11년 전 조회 3,849
11년 전 조회 2,465
11년 전 조회 4,390
11년 전 조회 4,559
11년 전 조회 3,118
11년 전 조회 3,788
11년 전 조회 2,647
11년 전 조회 2,948
11년 전 조회 2,661
11년 전 조회 3,870
11년 전 조회 3,739
11년 전 조회 2,779
11년 전 조회 6,887
11년 전 조회 3,969
11년 전 조회 4,691
11년 전 조회 3,523
11년 전 조회 2,549
11년 전 조회 3,625
11년 전 조회 3,763
11년 전 조회 3,438
11년 전 조회 3,069
11년 전 조회 2,543
11년 전 조회 3,429
11년 전 조회 4,214
11년 전 조회 2,875
11년 전 조회 4,392
11년 전 조회 3,341
11년 전 조회 6,178
11년 전 조회 3,432
11년 전 조회 4,092
11년 전 조회 5,319
11년 전 조회 3,204
11년 전 조회 4,050
11년 전 조회 2,392
11년 전 조회 3,457
11년 전 조회 6,108
11년 전 조회 3,266
11년 전 조회 3,434