Textarea wrap attribute

Definition and Usage

wrap Set or return the wrap attribute value of the text area.

The HTML wrap attribute specifies how the text in the text area should wrap when the form is submitted.

See also:

HTML Reference Manual:Η ιδιότητα wrap του <textarea> του HTML

Example

Find out how the text in the text area should wrap when the form is submitted:

var x = document.getElementById("myTextarea").wrap;

Try it yourself

Syntax

Return the wrap attribute:

textareaObject.wrap

Set the wrap attribute:

textareaObject.wrap = soft|hard

Attribute value

Value Description
soft When submitted in the form, the text in the text area does not wrap. Default.
hard

Κατά την υποβολή του φόρματος, το κείμενο της περιοχής κειμένου θα κουραστεί (συμπεριλαμβανομένων των χαρακτήρων νέας γραμμής).

Συμβουλή:Όταν χρησιμοποιείται το "hard", πρέπει να καθοριστεί Η ιδιότητα cols.

Τεχνικά λεπτομέρειες

Η τιμή που επιστρέφεται: Η τιμή της αλφαβητικής ακολουθίας που δείχνει πώς ορίζεται η αλλαγή γραμμής του κειμένου στην περιοχή κειμένου κατά την υποβολή του φόρματος.

Υποστήριξη του περιηγητή

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Υποστήριξη Υποστήριξη Υποστήριξη Υποστήριξη Υποστήριξη