HTML <मेनू> विशेषता टाइप करें
उदाहरण
एक संदर्भ मेनू:
<menu type="context" id="mymenu">
<menuitem label="Refresh" onclick="window.location.reload();" icon="ico_reload.png">
</menuitem>
<menu label="Share on...">
<menuitem label="Twitter" icon="ico_twitter.png"
onclick="window.open('//twitter.com/intent/tweet?text='+window.location.href);">
</menuitem>
<menuitem label="Facebook" icon="ico_facebook.png"
onclick="window.open('//facebook.com/sharer/sharer.php?u='+window.location.href);">
</menuitem>
</menu>
<menuitem label="Email This Page"
onclick="window.location='mailto:?body='+window.location.href;"></menuitem>
</menu>
परिभाषा और उपयोग
प्रकार विशेषता मेनू के प्रकार को निर्दिष्ट करती है।
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो विशेषता का पूर्ण समर्थन करता है।
Attribute | |||||
---|---|---|---|---|---|
type | Not supported | Not supported | 8.0 (only type="context") |
Not supported | Not supported |
वाक्य - विन्यास
<menu type="list|context|toolbar">
गुण मान
Value | Description |
---|---|
list | Default. Specifies a list menu. A list of commands (li elements), that the user can perform or activate |
context | Specifies a context menu. The menu must be activated before the user can interact with the commands |
toolbar | Specifies a toolbar menu. Active commands, allows the user to interact with the commands immediately |
एचटीएमएल <मेनू> टैग