Objeto HTML DOM MenuItem
Objeto MenuItem
El objeto MenuItem representa un elemento HTML <menuitem>.
Nota: Actualmente, el elemento <menuitem> SOLO se admite en Firefox.
Acceder a un objeto MenuItem
Puede acceder a un elemento <menuitem> usando getElementById():
var x = document.getElementById("myMenuItem");
Crear un objeto MenuItem
Puede crear un elemento <menuitem> utilizando el método document.createElement():
var x = document.createElement("MENUITEM");
Propiedades del objeto 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 |
Propiedades y eventos estándar
El objeto MenuItem también admite las propiedades y eventos estándar .
páginas relacionadas
Referencia HTML: etiqueta HTML <menuitem>