HTML command label 屬性
實例
一個帶有label 的<command> 元素:
<menu>
<command type="command" label="Save changes"
onclick="save()">Save</command>
</menu>
<command type="command" label="Save changes"
onclick="save()">Save</command>
</menu>
嘗試一下»
瀏覽器支持
目前,幾乎所有的主流瀏覽器都不支持label 屬性。
定義和用法
必需的label 屬性規定command 的名稱,用於展示給用戶。
HTML 4.01 與HTML5之間的差異
<command> 標籤是HTML5 中的新標籤。
語法
<command label="text">
屬性值
值 | 描述 |
---|---|
text | 规定 command 的可见标签。 |
HTML <command>標籤