menu type attribute
The type attribute on the menu element:
Toolbar menu ⁄ Popup menu
A toolbar menu: can be created
- if type attribute = "toolbar" OR
- if type attribute is missing, by default the menu creates a toolbar menu: Syntax1 = Syntax2
1 2 3 4 5 6 7 8 9 10 11 | <!doctype html> <> <> <>...</> </> <> < type="toolbar">...</> </> </> |
1 2 3 4 5 6 7 8 9 10 11 | <!doctype html> <> <> <>...</> </> <> <>...</> </> </> |
A popup menu: can be created
- if type attribute = "popup" OR
- if type attribute is missing, but the menu elements is child of another menu element who's type attribute = "popup", then the menu element creates a popup menu too (state inherited from its parent): Syntax3 = Syntax4
1 2 3 4 5 6 7 8 9 10 11 12 13 | <!doctype html> <> <> <>...</> </> <> < type="popup"> < type="popup"> ...</> </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 | <!doctype html> <> <> <>...</> </> <> < type="popup"> <> ...</> </> </> </> |
A popup menu: can be activated
- through the global attribute contextmenu - see this » video demo OR
- through the specific attribute menu from button element
Examples
<menu | attribute | = | "value(s)" | > | ... | <⁄menu> | Examples |
---|---|---|---|---|---|---|---|
2. | type | = | popup, toolbar | <menu type="popup"> ... <⁄menu> <menu type="toolbar"> ... <⁄menu> |
Note: the 2 attributes are not currently supported in browser!