disabled attribute stops the user from interacting
form control. In this case, it prevents the
user from clicking on the
textarea, tabbing to it with
the keyboard, or gaining access to any default text that appears inside
The most likely application for
this attribute is to disable a
textarea until such a
time as some other condition has been met (for example, a checkbox is
ticked to confirm the user’s acceptance of terms and conditions). At this
"disabled" value, making the form control
disabledattribute prevents the
textareafrom being used:
<form> <label for="perfectday">Describe your perfect day:</label> <textarea id="perfectday" disabled="disabled" name="perfectday" accesskey="d" cols="40" rows="10"></textarea> <input type="submit" value="Tell us"/> </form>
"disabled" is the
only value this attribute can accept.
It causes no compatibility issues, and has excellent support across all tested browsers.
There are no comments yet.