The disabled attribute specifies that the input field is disabled. A disabled element is un-usable and un-clickable and will not be submitted.
HTML file: | Displayed by browser: |
---|---|
<form>
First name: <br /><input type="text" name="firstname" value="John" disabled> <br /> <br />Last name:<br /> <input type="text" name="lastname"> </form> |
The disabled attribute does not need a value. It is the same as writing disabled="disabled".