HTML type 属性,定义 command 的类型

 2022-06-19    492  

HTML <command> type 属性

HTML <command> 标签

HTML  type 属性,定义 command 的类型

实例

一个类型为 "command" 的 <command> 元素:

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

目前,几乎所有的主流浏览器都不支持 type 属性。

注意:Internet Explorer 9 支持 type 属性(只有 IE9 支持,之前或者之后的版本都不支持)。但是,它只支持 "command" 类型。

定义和用法

type 属性规定 command 的类型。

HTML 4.01 与 HTML5之间的差异

<command> 标签是 HTML5 中的新标签。

语法

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

属性值

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


  •  标签:  
  • html
  •  

原文链接:https://77isp.com/post/1380.html

=========================================

https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。