HTMLTextAreaElement: type property
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The read-only type
property of the HTMLTextAreaElement
always returns textarea
.
Value
A string whose value is always textarea
.
Example
HTML
html
<textarea id="txtarea"></textarea>
JavaScript
js
const txtAreaElement = document.querySelector("#txtarea");
console.log(txtAreaElement.type); // Output: "textarea"
Specifications
Specification |
---|
HTML Standard # dom-textarea-type-dev |
Browser compatibility
BCD tables only load in the browser
See also
HTMLInputElement.type
property