command 标签
<command> 标签可以定义命令按钮,比如单选按钮、复选框或按钮。 只有当 command 元素位于 menu 元素内时,该元素才可见的。否则不会显示,但是可以用它规定键盘快捷键。
实例
标记一个按钮:
<menu><command onclick="alert('Hello xinbiancheng.cn')">Click Me!</command></menu>
<command> 标签HTML5 中的新属性
<command> 标签HTML5 中的新属性
| 属性 | 值 | 描述 |
|---|---|---|
| checked | checked | 定义是否被选中。仅用于 radio 或 checkbox 类型。 |
| disabled | disabled | 定义 command 是否可用。 |
| icon | url | 定义作为 command 来显示的图像的 url。 |
| label | text | 为 command 定义可见的 label。 |
| radiogroup | groupname | 定义 command 所属的组名。仅在类型为 radio 时使用。 |
| type | checkbox command radio |
定义该 command 的类型。默认是 "command"。 |

浙公网安备 33010602011771号