Oggetto MenuItem HTML DOM
Oggetto MenuItem
L'oggetto MenuItem rappresenta un elemento HTML <menuitem>.
Nota: l'elemento <menuitem> è attualmente supportato SOLO in Firefox.
Accedi a un oggetto MenuItem
Puoi accedere a un elemento <menuitem> usando getElementById():
var x = document.getElementById("myMenuItem");
Crea un oggetto MenuItem
Puoi creare un elemento <menuitem> usando il metodo document.createElement():
var x = document.createElement("MENUITEM");
Proprietà dell'oggetto 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 |
Proprietà ed eventi standard
L'oggetto MenuItem supporta anche le proprietà e gli eventi standard .
Pagine correlate
Riferimento HTML: tag HTML <menuitem>