HTMLTextAreaElement: value プロパティ

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.

valueHTMLTextAreaElement インターフェイスのプロパティで、この <textarea> 要素の値を文字列で表します。ウィジェットに中身が含まれていない場合は、空文字列が返されます。このプロパティは、このコントロールに含まれる生の値を返したり設定したりします。

この <textarea> 要素の中身の入った文字列です。

js
const textareaElement = document.getElementById("comment");
const oldText = textArea.value;
textArea.value = oldText.toUpperCase();

仕様書

Specification
HTML
# dom-textarea-value-dev

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
value

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報