Objeto de item de menu HTML DOM
Objeto MenuItem
O objeto MenuItem representa um elemento HTML <menuitem>.
Nota: O elemento <menuitem> atualmente é suportado SOMENTE no Firefox.
Acessar um objeto MenuItem
Você pode acessar um elemento <menuitem> usando getElementById():
var x = document.getElementById("myMenuItem");
Criar um objeto MenuItem
Você pode criar um elemento <menuitem> usando o método document.createElement():
var x = document.createElement("MENUITEM");
Propriedades do 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 |
Propriedades e eventos padrão
O objeto MenuItem também suporta as propriedades e eventos padrão .
Páginas relacionadas
Referência HTML: tag HTML <menuitem>