The disabled property is a boolean property.
The disabled property specifies that the text area should be disabled.
The disabled text area is neither available nor selectable (cannot be copied).
The disabled property can be set to restore the user's use of the text area until certain conditions are met (such as selecting a check box). JavaScript can then be used to remove the value of the disabled attribute to make the text area available.
Differences between HTML 4.01 and HTML5
none.
Differences between HTML and XHTML
In XHTML, property minimization is prohibited and the disabled property must be defined as <textarea disabled=disabled>.
The disabled attribute indicates a disabled text area in which the content cannot be modified and the value cannot be passed in the request.
<textarea disabled> On Wulin.com you will learn how to create a website. We provide the most complete web technology tutorials. </textarea>The difference between disabled and disabled = disabled
disabled = disabled is an XML specification. If you keep XML compatible, you must write disabled = disabled. If you do not use XHTML and do not care about XML syntax, you can use it alone.
Note: In browsers other than Firefox, such as chrome <textarea disabled> can be selected and copied.
Readonly definition and usageThe readonly property is a boolean property.
The readonly property specifies that the text area is read-only.
In the read-only text area, the content cannot be modified, but the user can switch to the control through the tab key and select or copy the content in it.
The readonly property can be set and the user's use of the text area is not restored until certain conditions are met (such as selecting a check box). JavaScript can then be used to remove the value of the readonly property to make the text area editable. The readonly property specifies that the text area is read-only. In the read-only text area, the content cannot be modified. Values can be passed in the request.
The specific usage is as follows:
<textarea readonly=readonly>test1</textarea> <textarea rows=3 cols=20 disabled=disabled> test2 </textarea>
Differences between HTML and XHTML
In XHTML, property minimization is prohibited and the readonly property must be defined as <textarea readonly=readonly>.