HTMLTextAreaElement: wrap プロパティ
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.
wrap
は HTMLTextAreaElement
インターフェイスのプロパティで、コントロールがフォーム送信用の値をどのように折り返し表示するかを示します。これは <textarea>
要素の wrap
属性を反映しています。 "hard"
値は、 cols
属性も設定されている場合にのみ効果があることに注意してください。
値
利用可能な値は wrap
を参照してください。既定値は "soft"
です。
例
js
const textareaElement = document.getElementById("comment");
const oldWrap = textArea.wrap;
textArea.wrap = "hard"; // フォーム送信で (CR+LF) を追加
仕様書
Specification |
---|
HTML # dom-textarea-wrap |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
wrap |
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.