Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Nota: L'element comand s'ha eliminat de Gecko 24.0 en favor de l'element <menuitem>
. Firefox mai ha donat suport a aquest element comand, i s'ha abandonat la implementació de la interfície DOM HTMLCommandElement
existent a Firefox 24.
Sumari
L'element comand
representa un comando que l'usuari pot invocar.
Categories de contingut | contingut de flux, phrasing content, contingut metadata. |
---|---|
Contingut permès | Cap, és un empty element. |
Omissió de l'etiqueta | L'etiqueta d'inici és obligatori, però, com que és un element buit, l'ús d'una etiqueta final està prohibit. |
Elements pares permesos | només <colgroup> , encara que implícitament pot ser definida com la seva etiqueta d'inici però no és obligatòria. La <colgroup> no ha de tenir un <span> com a fill. |
Interfície DOM | HTMLCommandElement Obsolete since Gecko 24 |
Atributs
Aquest element inclou els atributs globals.
checked
- Indica si comand es seleccionat. S'ha d'ometre llevat que l'atribut
type
éscheckbox
oradio
. disabled
- Indica que comand no està disponible..
icon
- Dóna una imatge que representa el comand.
label
- El nom del command tal com es mostra a l'usuari.
radiogroup
- Aquest atribut dóna el nom del grup d'ordres, amb un
type
radio
, que es commuta quan s'alterna el propi comandament. S'ha omès aquest atribut llevat que l'atributtype
siguiradio
. type
- Aquest atribut indica el tipus de comandt. Això pot ser un dels tres valors.
-
command
o buit que és l'estat per defecte, i indica que es tracta d'un comand normal. -
checkbox
indica que command s'alterna amb un checkbox. -
radio
indica que command s'alterna amb un radiobutton.
-
Exemples
<command type="command" label="Save" icon="icons/save.png" onclick="save()">
Especificacions
Especificació | Estat | Comentari |
---|---|---|
HTML Living Standard The definition of '<command>' in that specification. |
Living Standard | |
HTML5 The definition of '<command>' in that specification. |
Recommendation |
Navegadors compatibles
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Suport bàsic | No support | No support | No support | No support | No support |
Característica | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Suport bàsic | No support | No support | No support | No support | No support |