The MenuItem object is new to HTML5.
The MenuItem object represents the HTML and menuitem elements.
Note: Currently, only Firefox browsers support the element.
You can use getElementById() to access the elements:
var x = document.getElementById("myMenuItem");
You can use the document.createElement() method to create an element:
var x = document.createElement("MENUITEM");
Property | Describe |
---|---|
checked | Whether setting up or returning menu items should be checked |
command | Set or return the value of the menu item command property |
default | Set or return whether the menu item should be the default command |
disabled | Whether the setting or return menu item is disabled |
icon | Set up or return a picture that represents a menu item |
label | Set or return the label property value of the menu item |
radiogroup | Set or return the radiogroup property value for the menu item |
type | Set or return the type property value of the menu item |
MenuItem objects also support standard properties and events
HTML Reference Manual: HTML.lt; Tags . .