HTML DOM MenuItem Object
MenuItem Object
Het MenuItem-object vertegenwoordigt een HTML <menuitem>-element.
Opmerking: het element <menuitem> wordt momenteel ALLEEN ondersteund in Firefox.
Toegang tot een MenuItem-object
U kunt een <menuitem>-element openen met getElementById():
var x = document.getElementById("myMenuItem");
Een MenuItem-object maken
U kunt een <menuitem>-element maken met behulp van de document.createElement()-methode:
var x = document.createElement("MENUITEM");
MenuItem Objecteigenschappen
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 |
Standaard eigenschappen en evenementen
Het MenuItem-object ondersteunt ook de standaardeigenschappen en gebeurtenissen .
Gerelateerde pagina's
HTML-referentie: HTML <menuitem>-tag