English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Das min-Attribut legt den kleinsten Wert des <input>-Elements fest, in Kombination mit dem max-Attribut kann ein gültiger Wertebereich erstellt werden.
Verwendung der min und max Attribute:
!DOCTYPE html> <html> <head> <title>HTML: <input> max und min Attribute - Grundlegendes Tutorial-Netz(oldtoolbag.com)</title> <body> <form action="action_page.php"> Eingabe1999Jahr11Monat31Datum vor dem: <input type="date" name="bday" max="1999-11-31><br> Eingabe2010Jahr1Monat2Datum nach dem: <input type="date" name="bday" min="2010-01-02><br> Anzahl (1bis5zwischen): <input type="number" name="quantity" min="1" max="5><br> <input type="提交"> </form> </html>Testen Sie es heraus ‹/›
IEFirefoxOperaChromeSafari
Internet Explorer 10Opera, Chrome und Safari unterstützen das min-Attribut.
Note:Firefox or Internet Explorer 9 and earlier versions do not support the min attribute of the <input> tag.
Note:Due to Internet Explorer 10 These input types are not supported, the min attribute will not be applicable to IE 10 date and time.
The min attribute specifies the minimum value of the <input> element.
Hint:The min attribute is used with max attributes can be used together to create a valid value range.
Note:The max and min attributes are applicable to the following input types: number, range, date, datetime, datetime-local, month, time and week.
The min attribute is an HTML5 New attributes added.
<input min="number|date">
Value | Description |
---|---|
number | Numeric value. Defines the minimum allowed value for the input field. |
date | Date. Defines the minimum allowed value for the input field. |