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 the 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>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the disabled attribute
The disabled attribute is a boolean (boolean) attribute.
If this attribute is used, the button will be disabled.
Disabled buttons are unusable and cannot be clicked.
The disabled attribute can be set to allow users to click the button only when certain conditions are met (such as checking a checkbox, etc.). Then, JavaScript can be used to remove the disabled attribute, making the button available again.
None.
In XHTML, attributes are not allowed to be abbreviated, the disabled attribute must be defined as <button disabled="disabled">.
<button disabled>