RadarURL

조회 수 7167 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
- 2000년생 입력 가능 -

중복이면 과감히 삭제바랍니다.

주민등록입력시 자동으로 커서 넘기고 생일자동입력하기 (2000년가능) - 에지, Legend 님꺼 짬뽕

무슨뜻인지 모르시는 분을 위해 예제로

http://www.myr.co.kr/bbs/member_join.php

에서 주민번호 입력해보시면................

허접하지만 왕초보인 저로써는 ...........더 좋은 방법 있으면 갈켜주세요.........^^


//////////본론/////////////

자바스크립트를 이용한 것으로 제로보드 디렉토리의 member_join.php와 member_modify.php를 조금 수정하시면 됩니다.

아래는 주민등록 첫번째 부분을 채우면 자동으로 다음칸으로 커서를 옮겨주며
생년월일 란에 주민등록번호에 등록된 생년월일을 자동으로 넣어주는 스크립트입니다.




1. member_join.php문서에서 <script>아래에 아래 두 함수를 넣어 주시면 됩니다.


  function check_id(id) {
<? echo "$script_check_id"; ?>

        window.open('check_user_id.php?user_id='+id,'check_user_id','width=330,height=230,toolbar=no,status=no,resizable=no');
}

위 소스(100~130줄 사이) 다음부분에 넣어주세여....(약간 소스가 다를수 있습니다)


//////////여기서부터/////////

// 주민번호 체크하여 생일로 포커스 옮김
   function Birth_date() {
        var birth = document.write.jumin1.value;
        var jumin2input = document.write.jumin2.value.charAt(0);

        if(jumin2input <= 2) {y2k = "19";} else {y2k = "20";}
        document.write.birth_1.value = y2k+birth.substring(0,2);

        if (birth.substring(2,3) == "0") {
            document.write.birth_2.value = birth.substring(3,4);
        } else {
            document.write.birth_2.value = birth.substring(2,4);
        }
        if (birth.substring(4,5) == "0") {
            document.write.birth_3.value = birth.substring(5,6);
        } else {
            document.write.birth_3.value = birth.substring(4,6);
        }
   }


   //자동으로 포커스 옮김
function Next_Jumin_Input()
{

if (event.keyCode!=37 && event.keyCode!=39)
{
        if (write.jumin1.value.length == 6)
          {
                write.jumin2.focus();
                write.birth_1.value="19"+write.jumin1.value.substring(0,2);
                write.birth_2.value=write.jumin1.value.substring(2,4);
                write.birth_3.value=write.jumin1.value.substring(4);
        }
}
}

///////////여기까지///////////


2. 그리구 주민등록번호 뒷자리 입력폼인데요.. 아래와 같이 굵은 글씨 부분을 추가해줍니다.

<input type=text name=jumin1 size=6 maxlength=6 style=border-color:#d8b3b3 class=input onKeyUp="Next_Jumin_Input();">

<input type=password name=jumin2 size=7 maxlength=7 style=border-color:#d8b3b3 class=input onBlur="Birth_date();">

3. 생년월일 입력폼에서 수정못하게 바꾸시려면 아래와 같이 굵은 글씨 부분을 추가해 줍니다.
<? if($group[use_birth]) { ?>
    <tr align=right height=23>
      <td bgcolor="ffffff" >생년월일 : </td>
      <td align=left>  <input type=text name=birth_1 size=4 maxlength=4 style=border-color:#dddddd;background-color:#fafafa; class=input readonly>
        년   <input type=text name=birth_2 size=2 maxlength=2 style=border-color:#dddddd;background-color:#fafafa; class=input readonly>
        월   <input type=text name=birth_3 size=2 maxlength=2 style=border-color:#dddddd;background-color:#fafafa; class=input readonly>
        일
        <input type=checkbox value=1 checked name=open_birth>
        공개 </tr>
                <tr>
        <td colspan=2 height=1 bgcolor=#eeeeee></td>
        </tr>
    <tr>
      <td colspan="5" bgcolor="#ffffff" align="center"></td>
    </tr>
    <? } ?>

4. member_modify.php 에서도 생년월일 입력폼에서 수정못하게 바꾸시려면 3번과 굵은 글씨 부분을 추가해 줍니다


여기까지입니다. 허접 했지요^^ ^^ ^^ ^^ 초보님들 화이링~~~~~~~~~~~~~`







추천 받을 수 있을까?




에지님 소스
http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=1&sn1=&divpage=1&sn=off&ss=on&sc=off&keyword=주민&select_arrange=headnum&desc=asc&no=3876

Legend님 소스
http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=1&sn1=&divpage=1&sn=off&ss=on&sc=off&keyword=주민&select_arrange=headnum&desc=asc&no=1155

출처 : http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=1&sn1=&divpage=1&sn=off&ss=on&sc=off&keyword=생일&select_arrange=headnum&desc=asc&no=4917 - 멋진-kth님
?

공부 게시판

공부에 도움되는 글을 올려주세요.

  1. [공지] 공부 게시판 입니다.

    Date2003.08.18 By처누 Views931924
    read more
  2. 홍콩 보내주다를 뜻하는 영어 표현 한가지를 노래를 통해 배워보자

    Date2025.10.28 Category연애 ByJaeSoo Views24
    Read More
  3. 향수 잔향 기간별 구분

    Date2025.10.28 Category생활 ByJaeSoo Views20
    Read More
  4. Question about Korean - What does 홍콩을 보내다 mean?

    Date2025.10.28 Category생활 ByJaeSoo Views19
    Read More
  5. 리눅스 서버 설치 중 에러 "Failed to find a suitable stage1 device"

    Date2025.10.03 Category유닉스/리눅스 ByJaeSoo Views47
    Read More
  6. Linux 11 . Linux 설치 시 lvm 수동설정

    Date2025.10.03 Category유닉스/리눅스 ByJaeSoo Views39
    Read More
  7. [Rocky Linux] 누구나 쉽게 따라하는 Rocky Linux 9.0 OS 다운로드 및 설치 방법~!!

    Date2025.10.03 Category유닉스/리눅스 ByJaeSoo Views67
    Read More
  8. Linux/Rocky Linux Rocky Linux : Composer 설치

    Date2025.09.29 Category유닉스/리눅스 ByJaeSoo Views56
    Read More
  9. [Rocky Linux] 록키 리눅스 최신 업데이트 적용 방법

    Date2025.09.29 Category유닉스/리눅스 ByJaeSoo Views53
    Read More
  10. rocky linux 커널 업데이트

    Date2025.09.29 Category유닉스/리눅스 ByJaeSoo Views47
    Read More
  11. [Windows] OWASP ZAP 사용법

    Date2025.09.29 Category웹서버,WAS ByJaeSoo Views62
    Read More
  12. [웹 취약점] 웹서버 디렉토리 리스팅 방지

    Date2025.09.29 Category웹서버,WAS ByJaeSoo Views72
    Read More
  13. Clonezilla(클론질라) 백업파일 하드디스크로 복구 방법

    Date2025.09.28 Category유닉스/리눅스 ByJaeSoo Views56
    Read More
  14. 클론질라 사용 방법 - OS 이미지 백업 CloneZilla

    Date2025.09.28 Category유닉스/리눅스 ByJaeSoo Views78
    Read More
  15. [Linux / Rocky] FTP 접속 관련 설정 실습 예제

    Date2025.09.23 Category유닉스/리눅스 ByJaeSoo Views99
    Read More
  16. Could not reliably determine the server's fully qualified domain name

    Date2025.09.23 Category유닉스/리눅스 ByJaeSoo Views98
    Read More
  17. [아파치] 아파치 웹서버에 .htaccess 파일 설정하는 방법

    Date2025.09.23 Category유닉스/리눅스 ByJaeSoo Views74
    Read More
  18. [Linux] Apache web server의 rewrite module 사용하기 [출처] [Linux] Apache web server의 rewrite module 사용하기|작성자 g00dmoney

    Date2025.09.23 Category유닉스/리눅스 ByJaeSoo Views69
    Read More
  19. 록키 리눅스 9.1에서 apache, mysql, PHP 설치

    Date2025.09.23 Category유닉스/리눅스 ByJaeSoo Views81
    Read More
  20. [권한문제] 라이믹스 Fatal error: Uncaught Rhymix\Framework\Exception: Cannot write template cache file

    Date2025.09.23 Category유닉스/리눅스 ByJaeSoo Views73
    Read More
  21. 라이믹스 php 에러 표시

    Date2025.09.23 Category유닉스/리눅스 ByJaeSoo Views60
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 126 Next
/ 126


즐겨찾기 (가족)

JAESOO's HOMEPAGE


YOUNGAE's HOMEPAGE


장여은 홈페이지


장여희 홈페이지


장여원 홈페이지


즐겨찾기 (업무)

알리카페 홀릭

숭실대 컴퓨터 통신연구실 (서창진)

말레이시아 KL Sentral 한국인 GuestHouse


즐겨찾기 (취미)

어드민아이디

유에코 사랑회

아스가르드 좋은사람/나쁜사람

JServer.kr

제이서버 메타블로그

재수 티스토리


즐겨찾기 (강의, 커뮤니티)

재수 강의 홈페이지


한소리


VTMODE.COM


숭실대 인공지능학과


숭실대 통신연구실


베너