English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Die input value-Eigenschaft legt den Wert des <input>-Elements fest, die value-Eigenschaft wird auf unterschiedliche Weise für verschiedene Eingabetypen verwendet.
HTML-Formulare mit einem initialen (standardmäßigen) Wert:
!DOCTYPE html> <html> <head> <title>HTML: <input> value-Attribut - 基础教程网(oldtoolbag.com)</title> <body> <form action="action_page.php"> Benutzername: <input type="text" name="usrname" value="Jack"><br> Passwort: <input type="password" name="password" value="123456><br> <input type="submit" value="Submit"> </form> </html>Testen Sie es heraus ‹/›
IEFirefoxOperaChromeSafari
Alle gängigen Browser unterstützen das value-Attribut.
The value attribute specifies the value of the <input> element.
The way the value attribute is used for different input types varies:
For "button", "reset", "submit" types - Define the text on the button
For "text", "password", "hidden" types - Define the initial (default) value of the input field
For "checkbox", "radio", "image" types - Define the value associated with the input element, which will be sent to the form's action URL when the form is submitted.
Note:The value attribute is required for <input type="checkbox"> and <input type="radio">.
Note:The value attribute cannot be used with <input type="file">.
None.
<input value="text">
Value | Description |
---|---|
text | Specify the value of the <input> element. |