亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

目錄 搜尋
Attributes accesskey (attribute) class (attribute) contenteditable (attribute) contextmenu (attribute) data-* (attribute) dir (attribute) draggable (attribute) dropzone (attribute) Global attributes hidden (attribute) id (attribute) itemid (attribute) itemprop (attribute) itemref (attribute) itemscope (attribute) itemtype (attribute) lang (attribute) slot (attribute) spellcheck (attribute) style (attribute) tabindex (attribute) title (attribute) translate (attribute) Elements a abbr address area article aside audio b base bdi bdo blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 head header hr html i iframe img input input type="button" input type="checkbox" input type="color" input type="date" input type="datetime"-local input type="email" input type="file" input type="hidden" input type="image" input type="month" input type="number" input type="password" input type="radio" input type="range" input type="reset" input type="search" input type="submit" input type="tel" input type="text" input type="time" input type="url" input type="week" ins kbd label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt rtc ruby s samp script section select slot small source span strong style sub summary sup table tbody td template textarea tfoot th thead time title tr track u ul var video wbr Miscellaneous Attributes Block-level elements CORS enabled image CORS settings attributes Element Inline elements Kinds of HTML content Link types Microdata Optimizing your pages for speculative parsing Preloading content Reference Supported media formats Using the application cache Obsolete acronym applet basefont big blink center command content dir element font frame frameset hgroup image input type="datetime" isindex keygen listing marquee nextid noframes plaintext strike tt xmp
文字

這是一項 實驗技術

在使用此產品之前,請仔細檢查瀏覽器兼容性表。

用戶可以通過HTML<menuitem>標簽生成一個彈出式菜單。這包括上下文菜單,以及按鈕可能附帶的菜單。

這個標簽可以被顯式定義,帶有文本標簽和可選圖標來描述其外觀,或者作為一個間接命令,其行為由一個單獨的元素定義。命令還可以選擇包含復選框或分組共享單選按鈕。(<input type="checkbox"> 和 <input type="radio">.)

內容類別

沒有。

允許的內容

沒有,這是一個空的元素。

標記遺漏

必須有一個開始標簽,并且不能有結束標簽。

允許父級

<menu>元素,其中該元素處于彈出菜單狀態(tài)。(如果指定,<menu>元素的type屬性必須是popup;如果缺少,<menu>的父元素本身必須是彈出式菜單狀態(tài)下的<menu>。)

允許ARIA角色

沒有

DOM界面

HTMLMenuItemElement

屬性

這個元素包含全局屬性; 尤其title可以用來描述命令,或提供使用提示。

checked布爾值,指示是否選擇了命令。只能作為屬性使用在 checkbox 或 radio中

command指定一個單獨元素的ID,指示要間接調用的命令。在包含屬性的菜單項中也不能使用。checkeddisablediconlabelradiogroup 或 type.

default布爾值,表示使用與菜單主題元素相同的命令。(如button 或 input).

disabled布爾值,表示命令在當前狀態(tài)下不可用。請注意,禁用與隱藏不同;禁用的屬性適用于任何環(huán)境變化可能導致命令相關的上下文中。icon圖片URL,用于提供圖片來表示命令。

label展示給用戶一個命令的名字,當command 屬性不存在時是必須的。此屬性指定要切換為單選按鈕時,選定的一組命令的名稱。只能作為radio的屬性使用。

type這個屬性指定命令的類型,可以為以下三個命令之一。

  • command:一個有關聯動作的常規(guī)命令。這是缺省值缺省值。

  • checkbox:表示可以在兩種不同狀態(tài)之間切換的命令。

  • radio:表示可以作為單選按鈕切換的一組命令中的一個選擇。

例子

HTML內容

<!-- A <div> element with a context menu -->
<div contextmenu="popup-menu">Right-click to see the adjusted context menu</div>
<menu type="context" id="popup-menu">  
    <menuitem type="checkbox" checked>Checkbox</menuitem>  
    <hr>  
    <menuitem type="command" label="This command does nothing" icon="https://developer.cdn.mozilla.net/static/img/favicon144.png">
    Commands don't render their contents.  </menuitem>  
  <menuitem type="command" label="This command has javascript" onclick="alert('command clicked')">
    Commands don't render their contents.  </menuitem>  
  <hr>  
  <menuitem type="radio" radiogroup="group1">Radio Button 1</menuitem> 
  <menuitem type="radio" radiogroup="group1">Radio Button 2</menuitem>
</menu>

CSS內容

div {
  width: 300px;
  height: 80px;
  background-color: lightgreen;}

結果

規(guī)范

Specification

Status

Comment

HTML Living StandardThe definition of '<menuitem>' in that specification.

Living Standard


HTML 5.1The definition of '<menuitem>' in that specification.

Recommendation


瀏覽器兼容性

Feature

Chrome

Firefox (Gecko)

Internet Explorer

Edge

Opera

Safari

Basic support

No support1

8 (8)2

No support

No support

(Yes)3

?

Feature

Android

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

No support

8.0 (8)

No support

No support

No support

上一篇: 下一篇: