HTML <menu> label Atribut

❮ HTML tag <menu>

Příklad

Použití atributu label:

<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>

Definice a použití

Atribut label určuje viditelný popisek pro nabídku.

Atribut label se často používá k označení vnořených nabídek v nabídce.


Podpora prohlížeče

Čísla v tabulce určují první verzi prohlížeče, která tento atribut plně podporuje.

Attribute
label Not supported Not supported 8.0 Not supported Not supported

Syntax

<menu label="text">

Hodnoty atributů

Value Description
text Specifies a visible label for the menu

❮ HTML tag <menu>