English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Komplettes HTML-Tag-Verzeichnis

HTML: <command> checked Eigenschaft

Dieser Artikel beschreibt die Verwendung der HTML command checked Eigenschaft, zeigt Online-Beispiele, wie man die HTML command checked Eigenschaft verwendet, die Kompatibilität der Browser, die Syntaxdefinition und detaillierte Informationen zu seinen Eigenschaftswerten.

 HTML <command> Tag

Online-Beispiel

Ein voreingewähltes <command>-Element:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Verwendung der HTML command checked Eigenschaft-Grundlegende Anleitung(oldtoolbag.com)</title>
<script>
function setAlign()
{
    alert("Einige JavaScript...");
}
</script>
</head>
<body>
<menu>
<command type="radio" label="Links" checked onclick="setAlign('left')">Links</command>
<command type="radio" label="Mitte" onclick="setAlign('center')">Mitte</command>
<command type="radio" label="Rechts" onclick="setAlign('right')">Rechts</command>
</menu>
<p><b>Achtung:</b>Derzeit unterstützen fast alle gängigen Browser nicht die checked-Eigenschaft. .</p>
</body>
</html>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Currently, almost all mainstream browsers do not support the checked attribute.

Definition and Usage

The checked attribute is a boolean attribute.

The checked attribute specifies that the command element should be pre-selected when the page is loaded.

Note:The checked attribute can only be used when the command type is set to checkbox or radio, i.e. only when type="checkbox" or type="radio".

HTML 4.01 with HTML5differences

The <command> tag is in HTML5 with new tags.

Differences between HTML and XHTML

In XHTML, attribute minimization is prohibited, the checked attribute must be defined as <command checked="checked">.

Syntax

<command checked>

 HTML <command> Tag