HTML input type 값

 

글. 오상문 sualchi@daum.net

 

HTML에서 사용할 수 있는 input type 값은 다음과 같습니다.

 

  • <input type="button">
  • <input type="checkbox">
  • <input type="color">
  • <input type="date">
  • <input type="datetime-local">
  • <input type="email">
  • <input type="file">
  • <input type="hidden">
  • <input type="image">
  • <input type="month">
  • <input type="number">
  • <input type="password">
  • <input type="radio">
  • <input type="range">
  • <input type="reset">
  • <input type="search">
  • <input type="submit">
  • <input type="tel">
  • <input type="text">
  • <input type="time">
  • <input type="url">
  • <input type="week">

옵션으로 사용한 제한(Restrictions) 설정은 다음과 같습니다.

 

Attribute  속성                                                                   설명

disabled 입력 금지 설정
max 최대 값 설정 (type="range"에서 사용)
maxlength 최대 문자 길이 설정
min 최소 값 설정 (type="range"에서 사용)
pattern 정규식 패턴(입력 형식) 설정 
readonly 읽기 전용 설정 (수정 금지)
required 필수 입력 설정
size 입력 항목란 길이(문자 단위) 설정
step 숫자 간격 지정 (type="range"에서 사용)
value 기본 값 지정

 

자세한 설명과 예제는 아래 링크를 참조하세요.

 

jun.hansung.ac.kr/CWP/htmls/HTML%20Input%20Types.html

 

HTML Input 요소의 타입들(types)

HTML Input 요소의 타입들(types) 이 장에서는 요소의 입력 타입(type) 들을 설명한다.  HTML에서 사용할 수 있는 다른 input type은 다음과 같습니다.: Input Type: text 텍스트 입력(text input)위 한 줄의 입력 필

jun.hansung.ac.kr

 

반응형

+ Recent posts