English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces the usage of the HTML command label attribute, demonstrating online examples of how to use the HTML command label attribute, browser compatibility, syntax definition, and detailed information about its attribute values. The required label attribute specifies the name of the command, used to display it to the user.
An example of a <command> element with a label:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <command> label attribute usage-基础教程(oldtoolbag.com)</title> <script> function save() { alert("Some JavaScript...."); } </script> </head> <body> <menu> <command type="command" label="Save changes" onclick="save()">Save</command> </menu> <p><b>Attention : </b>Actuellement, presque tous les navigateurs populaires ne prennent pas en charge l'attribut label. </p> </body> </html>Vérifiez et voyez ‹/›
IEFirefoxOperaChromeSafari
Actuellement, presque tous les navigateurs populaires ne prennent pas en charge l'attribut label.
L'attribut label est obligatoire pour définir le nom de la commande, utilisé pour afficher à l'utilisateur.
La balise <command> est une balise HTML5 nouvelles balises dans
<command label="texte">
Valeur | Description |
---|---|
texte | Définir la balise visible pour command. |