HTML <input> 최소 속성
예시
min 및 max 속성 사용:
<form action="/action_page.php">
<label for="datemax">Enter a date before 1980-01-01:</label>
<input type="date" id="datemax" name="datemax" max="1979-12-31"><br><br>
<label for="datemin">Enter a date after 2000-01-01:</label>
<input type="date" id="datemin" name="datemin" min="2000-01-02"><br><br>
<label for="quantity">Quantity (between 1 and 5):</label>
<input type="number" id="quantity" name="quantity" min="1" max="5"><br><br>
<input type="submit">
</form>
정의 및 사용
속성 은 요소 min
의 최소값을 지정합니다
<input>
.
팁:min
속성과 함께
속성을 사용 max
하여 유효한 값 범위를 생성하십시오.
참고:max
및 속성 은 min
숫자, 범위, 날짜, datetime-local, 월, 시간 및 주와 같은 입력 유형에서 작동합니다.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Attribute | |||||
---|---|---|---|---|---|
min | 5.0 | 10.0 | 16.0 | 5.1 | 10.6 |
통사론
<input min="number|date">
속성 값
Value | Description |
---|---|
number | Specifies the minimum value allowed |
date | Specifies the minimum date allowed |
❮ HTML <입력> 태그