Propiedad de envoltura de área de texto
Ejemplo
Descubra cómo debe envolverse el texto en un área de texto al enviar un formulario:
var x = document.getElementById("myTextarea").wrap;
Definición y uso
La propiedad wrap establece o devuelve el valor del atributo wrap de un área de texto.
El atributo wrap especifica cómo se debe ajustar el texto en un área de texto cuando se envía en un formulario.
Compatibilidad con navegador
Property | |||||
---|---|---|---|---|---|
wrap | Yes | Yes | Yes | Yes | Yes |
Sintaxis
Devuelve la propiedad wrap:
textareaObject.wrap
Establezca la propiedad de envoltura:
textareaObject.wrap = soft|hard
Valores de propiedad
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 |
Detalles técnicos
Valor devuelto: | Una cadena, que representa cómo el área de texto envuelve el texto cuando se envía en un formulario |
---|
páginas relacionadas
Referencia de HTML: atributo de ajuste HTML <textarea>
❮ Objeto de área de texto