English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The disabled attribute is a boolean (boolean) attribute. If this attribute is used, the button will be disabled, and the disabled button cannot be used and cannot be clicked. The disabled attribute can be set so that the button can be clicked when certain conditions are met (such as checking a checkbox, etc.).
Disabled button:
<!DOCTYPE html> <html> <head> <title>HTML:<button> disabled attribute - 基础教程网 oldtoolbag.com</title> <body> <button type="button" disabled>Click Me!/button> </body> </html>Vérifiez ici ‹/›
IEFirefoxOperaChromeSafari
Tous les navigateurs populaires prennent en charge la propriété disabled
L'attribut disabled est une propriété boolean (booléen).
Si vous utilisez cet attribut, le bouton sera désactivé.
Les boutons désactivés ne peuvent pas être utilisés et ne peuvent pas être cliqués.
La propriété disabled peut être définie pour permettre à l'utilisateur de cliquer sur le bouton uniquement lorsqu'il satisfait certaines conditions (par exemple, sélectionner une case à cocher, etc.). Ensuite, vous pouvez utiliser JavaScript pour supprimer l'attribut disabled pour rendre le bouton utilisable.
Aucun.
Dans XHTML, les attributs ne sont pas abrégés, l'attribut disabled doit être défini comme <button disabled="disabled">.
<button disabled>