disabled definition and usage The disabled attribute is a boolean attribute. The disabled attribute specifies that the text area should be disabled. A disabled text area is neither usable nor has text that is selectable (cannot be copied). You can set the disabled property to restore user access to the text area until some condition is met (such as selecting a checkbox). You can then use JavaScript to remove the value of the disabled attribute to make the text area enabled. Differences between HTML 4.01 and HTML5 none. Differences between HTML and XHTML In XHTML, attribute minimization is prohibited and the disabled attribute must be defined as <textarea disabled="disabled">. The disabled attribute indicates a disabled text area. In a disabled text area, the content cannot be modified and the value cannot be passed in the request. <textarea disabled> At 123WORDPRESS.COM you will learn how to make a website. We provide the most comprehensive web technology tutorials. </textarea> The difference between disabled and disabled = "disabled" disabled = "disabled" is the XML standard writing method. If you want to maintain XML compatibility, you must write disabled = "disabled". If you do not use XHTML and do not care about the 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 usage The readonly attribute is a boolean attribute. The readonly attribute specifies that the text area is read-only. In a read-only text area, the content cannot be modified, but the user can switch to the control by using the tab key and select or copy the content. You can set the readonly attribute to restore user access to the text area until some condition is met (such as selecting a checkbox). You can then use JavaScript to remove the value of the readonly attribute to make the text area editable. The readonly attribute specifies that the text area is read-only. In a 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, attribute minimization is prohibited and the readonly attribute must be defined as <textarea readonly="readonly">. |
<<: The best way to solve the 1px border on mobile devices (recommended)
>>: This article will show you the basics of JavaScript: deep copy and shallow copy
I won't say much nonsense, let's just loo...
Union is a union operation on the data, excluding...
Table of contents 1. Several syntaxes of Insert 1...
Table of contents 1. Enter a directory and create...
First, take a look at Alibaba Cloud's officia...
This article mainly introduces the deployment of ...
Table of contents A simple component example More...
1. Achieve results 2. Data format returned by the...
As a powerful editor with rich options, Vim is lo...
Preface One of the functions of an interceptor is...
1. Inner Join Query Overview Inner join is a very...
Table of contents Preface Jump to APP method URL ...
I don't know when it started, but every time ...
introduce This article is based on React + antd t...
1 Problem Description This article sorts the esta...