English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Der command-Element wird verwendet, um einen Befehl darzustellen, den ein Benutzer aufrufen kann.
Der <command>-Tag kann wie folgt markiert werden:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Grundlagenkurs(oldtoolbag.com)</title> <script> function save() { alert("Einige JavaScript..."); } </script> </head> <body> <menu> <command type="command" label="Save" onclick="save()">Save</command> </menu> <p><b>Beachten Sie:</b> Nur IE 9 Der command-Tag wird unterstützt.</p> </body> </html>Testen Sie es heraus ‹/›
IEFirefoxOperaChromeSafari
Derzeit unterstützen alle gängigen Browser den <command>-Tag nicht.
Anmerkung:Nur IE 9 Unterstützt den <command>-Tag, andere IE-Browser in früheren oder späteren Versionen unterstützen den <command>-Tag nicht.
Der <command>-Tag kann Befehle definieren, die der Benutzer möglicherweise aufrufen kann (z.B. Radio-Buttons, Checkboxen oder Schaltflächen).
Wenn das <menu>-Element verwendet wird, wird das command-Element als Teil des Menüs oder der Symbolleiste angezeigt. Allerdings kann das command-Element bei der Definition von Tastaturkürzeln an jeder Stelle der Seite platziert werden, ist jedoch unsichtbar.
<command> Tag is an HTML 5 New tag in
New: HTML5 New attribute in
Attribute | Value | Description |
---|---|---|
checkedHTML5 | checked | Specify whether the command is selected when the page is loaded. Only used for radio or checkbox types. |
disabledHTML5 | disabled | Specify whether the command is available. |
iconHTML5 | URL | Specify the URL of the image to be displayed as the command. |
labelHTML5 | text | Required. Specify the name of the command, visible to the user. |
radiogroupHTML5 | groupname | Specify the group name of the command that can be toggled and will be toggled. Only used when the type is radio. |
typeHTML5 | checkbox command radio | Define the type of command. The default is "command". |
Support for <command> Tag Global Attributes of HTML.
Support for <command> Tag HTML Event Attributes.