CKTIS / JavaScript
HTMLTextAreaElement.value — current field text
`HTMLTextAreaElement.value` reads or sets a `textarea` element's current text. Assigning to `value` leaves `defaultValue` unchanged, but changing `defaultValue` can affect what `value` returns while the internal dirty value flag is unset.
Version: ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
Syntax
textarea.value
textarea.value = textHTMLTextAreaElement.value is a string-valued Web API property, not part of ECMAScript itself. It reads the current textarea text; assignment replaces that text. Reading normalizes line endings to LF (\n).
defaultValue represents the default text. Assigning value leaves it unchanged and sets the internal dirty value flag. Resetting the form restores the default text.
Assigning value does not itself fire input. The example requires a browser DOM; the presence of Node 24 alone does not establish support for this API.
Examples
const textarea = document.createElement('textarea');
textarea.defaultValue = 'Start';
textarea.value = 'A\r\nB';
console.log(JSON.stringify(textarea.value));
console.log(textarea.defaultValue);Result
"A\nB" Start
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.