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

· 11년 전 · 1452


관련파일 : 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,359
11년 전 조회 1,344
11년 전 조회 1,343
11년 전 조회 798
11년 전 조회 1,204
11년 전 조회 1,538
11년 전 조회 1,500
11년 전 조회 874
11년 전 조회 1,223
11년 전 조회 981
11년 전 조회 1,738
11년 전 조회 1,378
11년 전 조회 759
11년 전 조회 2,192
11년 전 조회 6,662
11년 전 조회 1,322
11년 전 조회 1,162
11년 전 조회 1,094
11년 전 조회 956
11년 전 조회 1,485
11년 전 조회 884
11년 전 조회 3,457
11년 전 조회 1,286
11년 전 조회 1,689
11년 전 조회 1,057
11년 전 조회 2,692
11년 전 조회 1,332
11년 전 조회 2,615
11년 전 조회 1,976
11년 전 조회 2,488
11년 전 조회 1,443
11년 전 조회 2,572
11년 전 조회 1,375
11년 전 조회 1,076
11년 전 조회 1,079
11년 전 조회 5,455
11년 전 조회 1,262
11년 전 조회 828
11년 전 조회 794
11년 전 조회 1,146
11년 전 조회 1,495
11년 전 조회 1,911
11년 전 조회 2,219
11년 전 조회 1,128
11년 전 조회 1,448
11년 전 조회 1,388
11년 전 조회 1,028
11년 전 조회 787
11년 전 조회 2,218
11년 전 조회 1,453
11년 전 조회 3,297
11년 전 조회 1,190
11년 전 조회 1,038
11년 전 조회 2,130
11년 전 조회 2,786
11년 전 조회 2,149
11년 전 조회 3,181
11년 전 조회 1,567
11년 전 조회 3,314
11년 전 조회 829
11년 전 조회 1,129
11년 전 조회 2,007
11년 전 조회 2,345
11년 전 조회 1,028
11년 전 조회 2,862
11년 전 조회 3,048
11년 전 조회 1,568
11년 전 조회 2,240
11년 전 조회 1,085
11년 전 조회 1,438
11년 전 조회 1,115
11년 전 조회 2,308
11년 전 조회 2,223
11년 전 조회 1,208
11년 전 조회 5,336
11년 전 조회 2,386
11년 전 조회 3,097
11년 전 조회 1,948
11년 전 조회 992
11년 전 조회 2,064
11년 전 조회 2,200
11년 전 조회 1,914
11년 전 조회 1,516
11년 전 조회 990
11년 전 조회 1,876
11년 전 조회 2,600
11년 전 조회 1,336
11년 전 조회 2,813
11년 전 조회 1,760
11년 전 조회 4,512
11년 전 조회 1,882
11년 전 조회 2,538
11년 전 조회 3,754
11년 전 조회 1,618
11년 전 조회 2,490
11년 전 조회 849
11년 전 조회 1,884
11년 전 조회 4,516
11년 전 조회 1,640
11년 전 조회 1,898
🐛 버그신고