كائن عنصر قائمة HTML DOM
كائن MenuItem
يمثل كائن MenuItem عنصر HTML <قائمة </ em>.
ملاحظة: العنصر <menuitem> متاح حاليًا فقط في Firefox.
الوصول إلى كائن MenuItem
يمكنك الوصول إلى عنصر <menuit em> باستخدام getElementById ():
var x = document.getElementById("myMenuItem");
إنشاء كائن MenuItem
يمكنك إنشاء عنصر <menu em> باستخدام طريقة document.createElement ():
var x = document.createElement("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>