English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
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 ‹/›
IEFirefoxOperaChromeSafari
Currently, almost all mainstream browsers do not support the checked attribute.
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".
The <command> tag is in HTML5 with new tags.
In XHTML, attribute minimization is prohibited, the checked attribute must be defined as <command checked="checked">.
<command checked>