English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Dieser Artikel beschreibt, dass das HTML-input checked-Eigenschaft eine boolesche Eigenschaft ist, die angibt, dass das <input>-Element beim Laden der Seite standardmäßig ausgewählt (markiert) sein sollte.
HTML-Formular mit standardmäßig markierten Kontrollkästchen:
<!DOCTYPE html> <html> <head> <title>HTML: <input> checked-Eigenschaft - Grundlagen-Tutorial-Web(oldtoolbag.com)</title> <body> <form action="action_page.php" method="get"> <input type="checkbox" name="vehicle" value="Bike">Mountainbike<br> <input type="checkbox" name="vehicle" value="Car" checked>Personenkraftwagen<br> <input type="submit" value="Submit"> </form> </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the checked attribute.
The checked attribute is a boolean attribute.
If present, it specifies that the <input> element should be pre-selected (checked) when the page loads.
The checked attribute can be used with <input type="checkbox"> and <input type="radio"> together.
The checked attribute can also be set after the page has finished loading through JavaScript code.
None.
In XHTML, attribute shorthand is prohibited, the checked attribute must be defined as <input checked="checked" />。
<input checked>HTML <input> Tag