HTML 5 <command> 標(biāo)簽
定義和用法
<command> 標(biāo)簽定義命令按鈕,比如單選按鈕、復(fù)選框或按鈕。
HTML 4.01 與 HTML 5 之間的差異
<command> 標(biāo)簽是 HTML 5 中的新標(biāo)簽。
屬性
屬性 | 值 | 描述 |
---|---|---|
checked | true | false | 定義是否被選中。僅用于 radio 或 checkbox 類型。 |
default | true | false | 如果為 true,則被激活。僅用于該 command 位于菜單中時(shí)。 |
disabled | true | false | 定義 command 是否可用。 |
hidden | true | false | 定義 command 是否可見(jiàn)。 |
icon | url | 定義作為 command 來(lái)顯示的圖像的 url。 |
label | command name | 為 command 定義名稱。label 是可見(jiàn)的。 |
radiogroup | name of radiogroup | 定義該 command 所屬的 radiogroup 的名稱。僅在類型為 radio 時(shí)使用。 |
type |
|
定義該 command 的類型。默認(rèn)是 command。 |
標(biāo)準(zhǔn)屬性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,請(qǐng)?jiān)L HTML 5 中標(biāo)準(zhǔn)屬性。
事件屬性
onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload
如需完整的描述,請(qǐng)?jiān)L HTML 5 中事件屬性。