Obiekt HTML DOM MenuItem
Obiekt MenuItem
Obiekt MenuItem reprezentuje element HTML <menuitem>.
Uwaga: Element <menuitem> jest obecnie obsługiwany TYLKO w przeglądarce Firefox.
Uzyskaj dostęp do obiektu MenuItem
Możesz uzyskać dostęp do elementu <menuitem> za pomocą getElementById():
var x = document.getElementById("myMenuItem");
Utwórz obiekt MenuItem
Możesz utworzyć element <menuitem> za pomocą metody document.createElement():
var x = document.createElement("MENUITEM");
Właściwości obiektu 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 |
Standardowe właściwości i zdarzenia
Obiekt MenuItem obsługuje również standardowe właściwości i zdarzenia .
Powiązane strony
Odniesienie HTML: tag HTML <menuitem>