HTML <menu> label Attribuut
Voorbeeld
Gebruik van het label attribuut:
<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>
Definitie en gebruik
Het label attribuut specificeert een zichtbaar label voor het menu.
Het label attribuut wordt vaak gebruikt om geneste menu's binnen een menu te labelen.
Browserondersteuning
De getallen in de tabel geven de eerste browserversie aan die het kenmerk volledig ondersteunt.
Attribute | |||||
---|---|---|---|---|---|
label | Not supported | Not supported | 8.0 | Not supported | Not supported |
Syntaxis
<menu label="text">
Attribuutwaarden
Value | Description |
---|---|
text | Specifies a visible label for the menu |
❮ HTML <menu>-tag