Objet HTML DOM MenuItem
Objet MenuItem
L'objet MenuItem représente un élément HTML <menuitem>.
Remarque : L'élément <menuitem> est actuellement pris en charge UNIQUEMENT dans Firefox.
Accéder à un objet MenuItem
Vous pouvez accéder à un élément <menuitem> en utilisant getElementById() :
var x = document.getElementById("myMenuItem");
Créer un objet MenuItem
Vous pouvez créer un élément <menuitem> en utilisant la méthode document.createElement() :
var x = document.createElement("MENUITEM");
Propriétés de l'objet MenuItem
Property | Description |
---|---|
checked | Sets or returns whether the menu item should be checked |
command | Sets or returns the value of the command attribute of the menu item |
default | Sets or returns whether the menu item should be the default command |
disabled | Sets or returns whether the menu item should be disabled |
icon | Sets or returns an image that represents the menu item |
label | Sets or returns the value of the label attribute of the menu item |
radiogroup | Sets or returns the value of the radiogroup attribute of the menu item |
type | Sets or returns the value of the type attribute of the menu item |
Propriétés et événements standard
L'objet MenuItem prend également en charge les propriétés et événements standard .
Pages connexes
Référence HTML : balise HTML <menuitem>