HTML development manual
/ <menu>
<menu>
HTML <menu> 標(biāo)簽 實(shí)例 兩個(gè)菜單按鈕系列選項(xiàng)實(shí)例('File' 和 'Edit'): <menu type='toolbar'> <li> <menu label='File'> <button typ..
HTML <menu> 標(biāo)簽
實(shí)例
<html> <body> <menu type="toolbar"> <li> <menu label="File"> <button type="button" onclick="file_new()">New...</button> <button type="button" onclick="file_open()">Open...</button> <button type="button" onclick="file_save()">Save</button> </menu> </li> <li> <menu label="Edit"> <button type="button" onclick="edit_cut()">Cut</button> <button type="button" onclick="edit_copy()">Copy</button> <button type="button" onclick="edit_paste()">Paste</button> </menu> </li> </menu> <p><b>Note:</b> The <menu> tag is not supported in any of the major browsers.</p> </body> </html>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例
瀏覽器支持
目前主流瀏覽器并不支持 <menu> 標(biāo)簽。
標(biāo)簽定義及使用說明
<menu> 標(biāo)簽定義了一個(gè)命令列表或菜單。
<menu> 標(biāo)簽通常用于文本菜單,工具條和命令列表選項(xiàng)。
提示和注釋
提示: 使用 CSS 來定義菜單列表樣式。
HTML 4.01 與 HTML5之間的差異
HTML 4.01的 <menu> 元素已廢棄。
HTML5 中 <menu> 元素已被重新定義。
屬性
New:HTML5 新屬性。
屬性 | 值 | 描述 |
---|---|---|
labelNew | text | 描述菜單項(xiàng)的標(biāo)記。 |
typeNew | context toolbar list | 描述顯示菜單類型. 默認(rèn)為 "list"。 |
全局屬性
<menu> 標(biāo)簽支持全局屬性,查看完整屬性表 HTML全局屬性。
事件屬性
<menu> 標(biāo)簽支持所有 HTML事件屬性。