English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces the HTML command icon attribute that specifies the image representing the command element, with online examples demonstrating how to use the HTML command icon attribute, browser compatibility, syntax definition, and detailed information about its attribute values.
代表 <command> 元素的图像:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <command> icon 属性使用-基础教程(oldtoolbag.com)</title> <script> function setAlign() { alert("Some JavaScript...."); } </script> </head> <body> <menu> <command type="radio" label="Left" icon="left.png" onclick="setAlign(&"39;left');Left</command> <command type="radio" label="Center" icon="center.png" onclick="setAlign(&"39;center');Center</command> <command type="radio" label="Right" icon="right.png" onclick="setAlign(&"39;right')>Right</command> </menu> <p><b>Notice:</b>Currently, almost all mainstream browsers do not support the icon attribute.</p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
Currently, almost all mainstream browsers do not support the icon attribute.
The icon attribute specifies the image representing the command element.
<command> tag is part of HTML5 in the new tag.
<command icon="URL">
Value | Description |
---|---|
URL | Specifies the image representing the command. Possible values:
|