1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> <style type="text/css"> #tbl1 { width: 350px; border: 1px solid gray; border-collapse: collapse; } #tbl1 th, #tbl1 td { border: 1px solid gray; padding: 4px; } #tbl1 th { width: 100px; } #tbl1 td { width: 250px; } #jumin1, #jumin2 { width: 100px; } #year, #month, #day { width: 50px; } </style> <script type="text/javascript"> /* 문제 : 구현할 것 1. 주민번호 앞자리 *6자리를 입력하는 순간* -> 년,월,일 자동으로 채워넣기 -> 1900년대생, 서브스트링 잘라서, 2. 1번과 동시에 주민번호 뒷자리로 포커스 이동 3. 주민번호 뒷자리 1자리를 입력하는 순간 -> 남자/여자 자동으로 선택하기 생각해볼 것., **누구에게 어떤 이벤트 추가를 걸지? ** 6자리?? 1자리?? */ </script> </head> <body> <!-- ex21.htm --> <h2>회원 가입</h2> <table id="tbl1"> <tr> <th>주민번호</th> <td><input type="text" id="jumin1" /> - <input type="text" id="jumin2" /></td> </tr> <tr> <th>생년월일</th> <td> <input type="text" id="year" />년 <input type="text" id="month" />월 <input type="text" id="day" />일 </td> </tr> <tr> <th>성별</th> <td> <input type="radio" name="gender" id="g1" />남자 <input type="radio" name="gender" id="g2" />여자 </td> </tr> </table> </body> </html> | cs |
문제] 주민번호 입력폼 구현하기
2016. 1. 22. 19:57