This article mainly introduces the differences between readonly and disabled attributes, which are very simple and practical. For more information, see the differences between readonly and disabled attributes of tags:
In form elements, readonly and disable have similarities, because they can both set some form elements to "unavailable" States. Of course, the difference between them is huge, the following describes the differences between these two attributes, hoping to help those who need them.
Two attribute differences are listed:
1. The readonly attribute is valid only for the text box, password box, and multi-row text box of the form element, and the disabled attribute is valid for all form elements.
2. Set the two attributes to have different appearances. You can observe them.
3. The value of the form Element Set to readonly is still submitted, but the value of the form Element Set to disabled is not submitted.
The preceding figure shows the difference between the readonly and disabled attributes. It is helpful for you to learn html.