Objek Item Menu DOM HTML
Objek Item Menu
Objek MenuItem mewakili elemen <menuitem> HTML.
Catatan: Elemen <menuitem> saat ini HANYA didukung di Firefox.
Mengakses Objek MenuItem
Anda dapat mengakses elemen <menuitem> dengan menggunakan getElementById():
var x = document.getElementById("myMenuItem");
Buat Objek MenuItem
Anda dapat membuat elemen <menuitem> dengan menggunakan metode document.createElement() :
var x = document.createElement("MENUITEM");
Properti Objek 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 |
Properti dan Acara Standar
Objek MenuItem juga mendukung properti dan event standar .
Halaman Terkait
Referensi HTML: HTML <menuitem> tag