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 : Change the default value of a text area
The defaultValue property sets or returns the default value of a text area.
Property | |||||
---|---|---|---|---|---|
defaultValue | Yes | Yes | Yes | Yes | Yes |
Return the defaultValue property:
Set the defaultValue property:
Value | Description |
---|---|
text | Specifies the default value (contents) of the text area |
Return Value: | A String, representing the default value of the text area |
---|
Get the default value of a text area:
var x = document.getElementById("myTextarea").defaultValue;
❮ Textarea Object