입력 제한(Input Restrictions) 1 정보
HTML 입력 제한(Input Restrictions) 1본문
입력 제한(Input Restrictions)
몇 가지 일반적인 입력 제한 목록이 있습니다 (일부는 HTML5에서 새로 추가되었습니다).
Attribute | Description |
---|---|
disabled | Specifies that an input field should be disabled |
max | Specifies the maximum value for an input field |
maxlength | Specifies the maximum number of character for an input field |
min | Specifies the minimum value for an input field |
pattern | Specifies a regular expression to check the input value against |
readonly | Specifies that an input field is read only (cannot be changed) |
required | Specifies that an input field is required (must be filled out) |
size | Specifies the width (in characters) of an input field |
step | Specifies the legal number intervals for an input field |
value | Specifies the default value for an input field |
다음 장에서는 입력 제한에 대해 자세히 설명합니다. 다음 예제에서는 0에서 100 사이의 값을 10 단위로 입력 할 수있는 숫자 입력 필드를 표시합니다. 기본값은 30입니다. OperaSafariChromeFirefoxInternet Explorer 예 <form> 수량: <input type = "number"name = "points"min = "0"max = "100"step = "10"value = "30"> </ form>
추천
0
0
댓글 0개