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>
정의 및 사용
type 속성은 메뉴의 유형을 지정합니다.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
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 |
❮ HTML <메뉴> 태그