HTMLTextAreaElement: type property
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