JavaScript 參考手冊(cè)
MenuItem 對(duì)象表示 HTML <menuitem> 元素。
注意:目前只有Firefox瀏覽器支持 <menuitem> 元素。
你可以使用 getElementById() 來(lái)訪問(wèn)<menuitem>元素:
你可以使用 document.createElement() 方法創(chuàng)建 <menuitem> 元素:
Property | 描述 |
---|---|
checked | 設(shè)置或返回菜單項(xiàng)是否應(yīng)進(jìn)行檢查 |
command | 設(shè)置或返回菜單項(xiàng) command 屬性的值 |
default | 設(shè)置或返回菜單項(xiàng)是否應(yīng)該是默認(rèn)的命令 |
disabled | 設(shè)置或返回菜單項(xiàng)是否禁用 |
icon | 設(shè)置或返回代表菜單項(xiàng)的圖片 |
label | 設(shè)置或返回菜單項(xiàng)的 label 屬性值 |
radiogroup | 設(shè)置或返回菜單項(xiàng)的 radiogroup 屬性值 |
type | 設(shè)置或返回菜單項(xiàng)的 type 屬性值 |
MenuItem 對(duì)象同樣支持標(biāo)準(zhǔn)的 屬性 和 事件
HTML 參考手冊(cè): HTML <menitemu> 標(biāo)簽