Объект MenuItem HTML DOM
Объект MenuItem
Объект MenuItem представляет HTML-элемент <menuitem>.
Примечание. Элемент <menuitem> в настоящее время поддерживается ТОЛЬКО в Firefox.
Доступ к объекту MenuItem
Вы можете получить доступ к элементу <menuitem> с помощью getElementById():
var x = document.getElementById("myMenuItem");
Создайте объект MenuItem
Вы можете создать элемент <menuitem> с помощью метода document.createElement():
var x = document.createElement("MENUITEM");
Свойства объекта 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 |
Стандартные свойства и события
Объект MenuItem также поддерживает стандартные свойства и события .
Связанные страницы
Справочник по HTML: HTML-тег <menuitem>