Latest web development tutorials

HTML command type property

Tag Reference HTML command HTML <command> tag

Examples

A type "command" of <command> element:

<menu>
<command type="command" label="Save" onclick="save()">Save</command>
</menu>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Currently, almost all the major browsers do not support the type attribute.

Note: Internet Explorer 9 supports the type attribute (only IE9 support, before or after the version is not supported).However, it only supports the "command" type.


Definition and Usage

type attribute specifies the type of command.


Differences between HTML 4.01 and HTML5

<Command> tag is new in HTML5 tags.


grammar

<command type="command|checkbox|radio">

Property Value

描述
command 默认。规定带有 action 的普通命令。
checkbox 使用复选框规定可切换的命令。
radio 使用单选按钮规定可切换的命令。


Tag Reference HTML command HTML <command> tag