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
background The amount of new data in the business...
A few days ago, I found that the official version...
1. Background 1. The front end uses vue + vuex + ...
1. Color matching effect preview As shown in the ...
I’ve always preferred grayscale images because I t...
Tomcat accesses the project, usually ip + port + ...
This article example shares the specific code of ...
Table of contents ReactHooks Preface WhyHooks? Fo...
0. Prepare relevant tables for the following test...
1. Problem description The storage installed in t...
1. Description In MySQL, when we need to get the ...
Table of contents 1. Vue life cycle 2. Hook funct...
Configure Git environment in Docker At work, I en...
Box-sizing in CSS3 (content-box and border-box) T...
Step 1: Enter the directory: cd /etc/mysql, view ...