HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Textarea Object : Set a text area to be read-only
The readOnly property sets or returns whether the contents of a text area should be read-only.
In a read-only text area, the content cannot be changed, but a user can tab to it, or highlight and copy the content from it.
This property reflects the HTML readonly attribute.
Property | |||||
---|---|---|---|---|---|
readOnly | Yes | Yes | Yes | Yes | Yes |
Return the readOnly property:
Set the readOnly property:
Value | Description |
---|---|
true|false |
Specifies whether a text area should be read-only or not.
|
Return Value: | A Boolean, returns true if the text area is read-only, otherwise it returns false |
---|
Find out if a text area is read-only or not:
var x = document.getElementById("myTextarea").readOnly;
❮ Textarea Object