एचटीएमएल डोम मेन्यूआइटम वस्तु
मेनू आइटम वस्तु
MenuItem ऑब्जेक्ट एक HTML <menuitem> तत्व का प्रतिनिधित्व करता है।
नोट: <menuitem> तत्व वर्तमान में केवल Firefox में समर्थित है।
एक मेनू आइटम ऑब्जेक्ट तक पहुंचें
आप getElementById() का उपयोग करके <menuitem> तत्व तक पहुंच सकते हैं:
var x = document.getElementById("myMenuItem");
एक मेनूआइटम वस्तु बनाएं
आप document.createElement() विधि का उपयोग करके <menuitem> तत्व बना सकते हैं:
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 <मेनूइटम> टैग