Textareawrapプロパティ_
例
フォームを送信するときに、テキスト領域のテキストをどのように折り返すかを確認します。
var x = document.getElementById("myTextarea").wrap;
定義と使用法
wrapプロパティは、テキスト領域のwrap属性の値を設定または返します。
wrap属性は、フォームで送信されたときにテキスト領域のテキストをどのように折り返すかを指定します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
wrap | Yes | Yes | Yes | Yes | Yes |
構文
wrapプロパティを返します。
textareaObject.wrap
wrapプロパティを設定します。
textareaObject.wrap = soft|hard
プロパティ値
Value | Description |
---|---|
soft | The text in the text area is not wrapped when submitted in a form. This is default |
hard | The text in the text area is wrapped (contains newlines) when submitted in a form. When "hard" is used, the cols attribute must be specified |
技術的な詳細
戻り値: | フォームで送信されたときにテキスト領域がテキストをどのように折り返すかを表す文字列 |
---|
関連ページ
HTML参照:HTML <textarea>ラップ属性
❮Textareaオブジェクト