HTML DOM MenuItem Object






<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]
-->



HTML DOM MenuItem Object



❮ Previous
Next ❯



MenuItem Object HTML5


The MenuItem Object is new in HTML5.


The MenuItem object represents an HTML <menuitem> element.


Note: The <menuitem> element is currently
ONLY supported in Firefox.


Access a MenuItem Object


You can access a <menuitem> element by using getElementById():




var x = document.getElementById("myMenuItem");



Create a MenuItem Object


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




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 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

Standard Properties and Events


The MenuItem object also supports the standard properties and events.




Related Pages


HTML reference: HTML <menuitem> tag





❮ Previous
Next ❯

Popular posts from this blog

Python Lists

Aion

JavaScript Array Iteration Methods