목차
<input type="time"> 예제 - 시간 입력
<input type="time"> 정의
<input type="time"> 구문
<input type="time"> 예제 - 시간 입력
<form action="/action_page.php">
<label for="time ">시간 선택:</label>
<input type="time" id="time " name="time ">
<input type="submit">
</form>
결과값예 : time=16:39
<input type="time"> 정의
시간 입력 가능한 INPUT 요소.
1.
입력할 땐 오전/오후 12간제(예: 오후 4:39)이나,서버 제출 땐 24시간제(예: 16:39)로 표현되어 전달됨.
<label> 태그 사용 시, 웹접근성 향상됨.
2. cf.
<input type="date "> 태그 - (예) 2023-09-23
<input type="datetime-local "> 태그 - (예) 2023-09-23T22:25
<input type="month "> 태그 - 2023-09
<input type="time "> 태그 - (예) 22:25
<input type="week "> 태그 - (예) 2023-W38
3.
IE 제외한 주요 최신브라우저 모두 지원 .
4. MDN <input type="time"> 예제보기
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time
<input type="time"> 구문
<input type="time">
주소 복사
랜덤 이동