• 회원가입
  • 로그인
  • 구글아이디로 로그인

[form] HTML - <input type="month"> 태그 - 연월(년월) 입력 (= 인풋먼스타입/먼스타입인풋/먼스인풋 요소)

목차
  1. <input type="month"> 예제 - 년월 입력
  2. <input type="month"> 정의
  3. <input type="month"> 구문

 

<input type="month"> 예제 - 년월 입력

 

<form action="/action_page.php">

  <label for="hzmonth">년월 선택:</label>

  <input type="month" id="hzmonth" name="hzmonth">

  <input type="submit">

</form>

 

결과보기 (전송키값쌍: hzmonth=2023-09)

 

<input type="month"> 정의

 

년월 선택 입력 가능한 INPUT 요소.

 


 

1.

  • YYYY-MM 형식으로 입력됨. (예) 2023-09
  • <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.

  • Chrome, Edge, Opera 최신 브라우저는 지원.
  • Firefox, Safari 브라우저는 지원 X

 

4. MDN <input type="month"> 예제보기

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month

 

 

<input type="month"> 구문

 

<input type="month">

 

 


분류 제목
attribute HTML - onkeyup 속성 ★ - 키보드키 올라갈 때 실행 (= onkeyup속성 = 온키업속성) ※ …
attribute HTML - lang 속성 - 요소 내용 언어코드 지정 (= lang속성 = 랭속성)
attribute HTML - required 속성 ★ - 폼데이터 제출 전 (입력필수/선택필수) 지정 (= required속…
attribute HTML - onprogress 속성 - (오디오/비디오) 다운로드 시 실행 (= onprogress속성 =…
etc HTML - 스크린리더기가 읽는 HTML요소 정보값 종류 (= Screen Reader provides th…
attribute HTML - onselect 속성 - 요소 내용 선택 시 실행 (= onselect속성 = 온실렉트속성) ※…
attribute HTML - onmouseout 속성 ★ - 마우스커서가 지정요소 밖으로 이동 시 실행 (= onmouseo…
attribute HTML - onmouseup 속성 - 마우스버튼 올라갈 때 실행 (= onmouseup속성 = 온마우스업속…
attribute HTML - defer 속성 ★★★ - 페이지 파싱 완료 후 외부스크립트 실행 (= defer속성 = 디퍼속…
attribute HTML - list 속성 - 인풋에 입력 가능한 데이터리스트 지정 (= list속성 = 리스트속성) ※ 입…
attribute HTML - ondrag 속성 - 드래그 이벤트 시 실행할 코드 지정 (= ondrag속성 = 온드래그속성)…
attribute HTML - tabindex 속성 - 탭색인번호 지정 (= tabindex속성 = 탭인덱스속성) ※ 탭넵비게…
attribute HTML - on으로 시작하는 속성에서 2개 이상의 여러 JS함수 실행 방법
attribute HTML - onvolumechange 속성 - (오디오/비디오) 볼륨변경 시 실행 (= onvolumech…
attribute HTML - onreset 속성 - 폼 초기화 시 실행 (= onreset속성 = 온리셋속성) ※ onres…
attribute HTML - data-* 속성 ★★★ - 특정 (페이지/애플리케이션)의 사용자 데이터 저장 (= data-속…
attribute HTML - oncopy 속성 - 요소의 텍스트나 이미지 태그를 복사 시 실행 (=oncopy속성 = 온카피…
attribute HTML - ondurationchange 속성 - 재생시간 데이터가 변경될 때 실행 (= onduratio…
form HTML - <input type="datetime-local"> 태그 - 년월일시분 입력 (= 인풋데이트타…
attribute HTML - content 속성 ★ - 메타데이터 값 지정 (= content속성 = 콘텐트속성|컨텐트속성)
4/18
목록
찾아주셔서 감사합니다. Since 2012