HTML DOM MenuItem Object
Objekt MenuItem
Objekt MenuItem představuje prvek HTML <menuitem>.
Poznámka: Prvek <menuitem> je aktuálně podporován POUZE ve Firefoxu.
Přístup k objektu MenuItem
K prvku <menuitem> se dostanete pomocí getElementById():
var x = document.getElementById("myMenuItem");
Vytvořte objekt MenuItem
Element <menuitem> můžete vytvořit pomocí metody document.createElement():
var x = document.createElement("MENUITEM");
Vlastnosti objektu MenuItem
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 |
Standardní vlastnosti a události
Objekt MenuItem také podporuje standardní vlastnosti a události .
Související stránky
HTML reference: HTML tag <menuitem>