How to implement the invalid button: first create an HTML sample file; then create the button through the button tag; finally set the disabled attribute to disable the button.
The operating environment of this article: windows7 system, HTML5 version, DELL G3 computer
How to implement the html invalid button?
The disabled attribute of the HTML
Definition and usage
The disabled attribute specifies a disabled button.
Disabled buttons are neither available nor clickable.
You can set the disabled attribute to restore the user's use of the button until certain conditions are met (such as selecting a checkbox). You can then use JavaScript to clear the disabled attribute so that the text area becomes available.
Example
A disabled button:
<button type="button" disabled="disabled">Click Me!</button>
Syntax
<button disabled="value">
Attribute value
Value
disabled specifies that the button should be disabled.
Recommended study: "HTML Video Tutorial"
The above is the detailed content of How to implement invalid button in html. For more information, please follow other related articles on the PHP Chinese website!