The disabled attribute on an input
tag disables the input element.
It is grayed out and is unusable.
An <input> element with a disabled attribute.
The input field is not usable and its value is not included during form submission.
<form action="/tutorial/action.html">
<label for="name">Name</label>
<input disabled type="text" id="name" name="name"><br /><br />
<input type="submit">
</form>
The disabled attribute specifies that the input element is disabled.
The input element appears grayed out and is unusable.
Disabled input elements are excluded from form submission.
<input disabled>
<input disabled="disabled">
Value | Description |
---|---|
disabled | Use value 'disabled' or no value at all. Both are valid. |
Here is when disabled support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |