HTML DOM Menü Öğesi Nesnesi
Menü Öğesi Nesne
MenuItem nesnesi, bir HTML <menuitem> öğesini temsil eder.
Not: <menuitem> öğesi şu anda SADECE Firefox'ta desteklenmektedir.
MenuItem Nesnesine Erişin
Bir <menuitem> öğesine getElementById() kullanarak erişebilirsiniz:
var x = document.getElementById("myMenuItem");
MenuItem Nesnesi Oluşturun
Document.createElement() yöntemini kullanarak bir <menuitem> öğesi oluşturabilirsiniz:
var x = document.createElement("MENUITEM");
Menü Öğesi Nesne Özellikleri
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 |
Standart Özellikler ve Etkinlikler
MenuItem nesnesi, standart özellikleri ve olayları da destekler .
İlgili Sayfalar
HTML referansı: HTML <menuitem> etiketi