HTML DOM MenuItem objects
MenuItem objects
MenuItem object is a new HTML5.
MenuItem object represents the HTML <menuitem> element.
Note: Currently only Firefox browsers support <menuitem> element.
Access MenuItem objects
You can use getElementById () to access the <menuitem> element:
var x = document.getElementById ( "myMenuItem");
Creating MenuItem objects
You can use document.createElement () method to create <menuitem> element:
var x = document.createElement ( "MENUITEM");
MenuItem object properties
Property | description |
---|---|
checked | Sets or returns whether the menu item should be checked |
command | Sets or returns the menu item command value of the property |
default | Sets or returns whether the menu item should be the default command |
disabled | Sets or returns whether the menu item is disabled |
icon | Sets or returns on behalf of a menu item image |
label | Sets or returns the label property of menu items |
radiogroup | Sets or returns radiogroup property of menu items |
type | Sets or returns the type property of menu items |
Standard properties and events
MenuItem objects also supports the standard attributes and events
related articles
HTML Reference Manual: HTML <menitemu> tag