HTMLTextAreaElement: type プロパティ

typeHTMLTextAreaElement の読み取り専用プロパティで、常に textarea を返します。

文字列で、常に textarea を返します。

HTML

html
<textarea id="txtarea"></textarea>

JavaScript

js
const txtAreaElement = document.querySelector("#txtarea");
console.log(txtAreaElement.type); // 出力結果: "textarea"

仕様書

Specification
HTML Standard
# dom-textarea-type-dev

ブラウザーの互換性

BCD tables only load in the browser

関連情報