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.
value
は HTMLTextAreaElement
インターフェイスのプロパティで、この <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 GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
value |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.