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

· 11년 전 · 2860


관련파일 : 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,761
11년 전 조회 2,779
11년 전 조회 2,754
11년 전 조회 2,212
11년 전 조회 2,605
11년 전 조회 2,961
11년 전 조회 2,910
11년 전 조회 2,242
11년 전 조회 2,609
11년 전 조회 2,385
11년 전 조회 3,127
11년 전 조회 2,760
11년 전 조회 2,117
11년 전 조회 3,537
11년 전 조회 8,038
11년 전 조회 2,664
11년 전 조회 2,543
11년 전 조회 2,412
11년 전 조회 2,294
11년 전 조회 2,854
11년 전 조회 2,233
11년 전 조회 4,805
11년 전 조회 2,665
11년 전 조회 3,031
11년 전 조회 2,387
11년 전 조회 3,936
11년 전 조회 2,705
11년 전 조회 4,057
11년 전 조회 3,377
11년 전 조회 3,868
11년 전 조회 2,873
11년 전 조회 3,981
11년 전 조회 2,797
11년 전 조회 2,490
11년 전 조회 2,464
11년 전 조회 6,856
11년 전 조회 2,676
11년 전 조회 2,224
11년 전 조회 2,179
11년 전 조회 2,553
11년 전 조회 2,916
11년 전 조회 3,352
11년 전 조회 3,641
11년 전 조회 2,587
11년 전 조회 2,841
11년 전 조회 2,790
11년 전 조회 2,401
11년 전 조회 2,222
11년 전 조회 3,604
11년 전 조회 2,861
11년 전 조회 4,682
11년 전 조회 2,609
11년 전 조회 2,504
11년 전 조회 3,553
11년 전 조회 4,208
11년 전 조회 3,564
11년 전 조회 4,600
11년 전 조회 2,975
11년 전 조회 4,741
11년 전 조회 2,260
11년 전 조회 2,540
11년 전 조회 3,390
11년 전 조회 3,741
11년 전 조회 2,345
11년 전 조회 4,282
11년 전 조회 4,462
11년 전 조회 2,991
11년 전 조회 3,666
11년 전 조회 2,535
11년 전 조회 2,842
11년 전 조회 2,547
11년 전 조회 3,769
11년 전 조회 3,630
11년 전 조회 2,663
11년 전 조회 6,766
11년 전 조회 3,850
11년 전 조회 4,566
11년 전 조회 3,411
11년 전 조회 2,435
11년 전 조회 3,513
11년 전 조회 3,646
11년 전 조회 3,329
11년 전 조회 2,959
11년 전 조회 2,436
11년 전 조회 3,315
11년 전 조회 4,078
11년 전 조회 2,757
11년 전 조회 4,284
11년 전 조회 3,220
11년 전 조회 6,074
11년 전 조회 3,320
11년 전 조회 3,986
11년 전 조회 5,203
11년 전 조회 3,103
11년 전 조회 3,944
11년 전 조회 2,287
11년 전 조회 3,347
11년 전 조회 5,989
11년 전 조회 3,155
11년 전 조회 3,336