English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces the usage of the HTML command radiogroup attribute, with online examples demonstrating how to use the HTML command radiogroup attribute, browser compatibility, syntax definition, and detailed information about its attribute values.
An HTML <command> element that belongs to a radiogroup:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <command> radiogroup Attribute Usage-基础教程(oldtoolbag.com)</title> <script> function setAlign() { alert("Some JavaScript...."); } </script> </head> <body> <menu> <command type="radio" label="Left" radiogroup="alignment" onclick="setAlign(&39;left')">Left</command> <command type="radio" label="Center" radiogroup="alignment" onclick="setAlign(&39;center')">Center</command> <command type="radio" label="Right" radiogroup="alignment" onclick="setAlign(&39;right')">Right</command> </menu> <p><b>Attention:</b>Currently, almost all mainstream browsers do not support the radiogroup attribute.</p> </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
Currently, almost all mainstream browsers do not support the radiogroup attribute.
The radiogroup attribute specifies the name of the command group. When the command is activated or toggled, the command group will be toggled.
Note:This attribute can only be used for common commands of type "radio", that is, it is only available when type="radio".
The <command> tag is an HTML5 in the new tag.
<command radiogroup="groupname">
Value | Description |
---|---|
groupname | Specifies the name of the command group that will be toggled when the command is activated or toggled (only applicable for type="radio"). |