HTML <input> disabled Attribute
HTML <input> tag
Example
An HTML form with a disabled input field:
<form
action="form_action.asp"
method="get">
First name: <input type="text" name="fname"
/><br />
Last name:
<input type="text" name="lname"
disabled="disabled" /><br />
<input type="submit" value="Submit" />
</form> |
Try it yourself »
|
Definition and Usage
The disabled attribute specifies that an input element should be disabled.
A disabled input element is unusable and un-clickable.
The disabled attribute can be set to keep a user from using an input field until some other condition has been met (like selecting a
checkbox, etc.). Then, a JavaScript is required to remove the disabled value, and make the input element usable.
Note: The disabled attribute will not work with <input type="hidden">.
Browser Support

The disabled attribute is supported in all major browsers.
Syntax
| <input disabled="value" /> |
Attribute Values
| Value |
Description |
| disabled |
Disables an input element |
HTML <input> tag
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
|