Easy Tutorial
❮ Prop Img Lowsrc Obj Screen ❯

HTML DOM MenuItem Object


MenuItem Object

The MenuItem object represents the HTML <menuitem> element.

Note: Currently, only Firefox supports the <menuitem> element.

Accessing MenuItem Object

You can use getElementById() to access the <menuitem> element:

Creating MenuItem Object

You can use the document.createElement() method to create a <menuitem> element:

MenuItem Object Properties

Property Description
checked Sets or returns whether the menu item should be checked
command Sets or returns the value of the menu item's command attribute
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 the image representing the menu item
label Sets or returns the value of the menu item's label attribute
radiogroup Sets or returns the value of the menu item's radiogroup attribute
type Sets or returns the value of the menu item's type attribute

Standard Attributes and Events

The MenuItem object also supports standard attributes and events.


Related Articles

HTML Reference: HTML <menuitem> Tag

❮ Prop Img Lowsrc Obj Screen ❯