Textarea valuePropiedad
Ejemplo
Modificar el contenido de texto de textarea:
document.getElementById("myTextarea").value = "Ejemplo";
Pruébalo »
Definición y uso
La propiedad value establece o devuelve el texto de textarea.
Sintaxis
Establecer la propiedad value:
textareaObject.value="text"
Devolver la propiedad value:
textareaObject.value
Valor de propiedad
| Valor | Descripción |
|---|---|
| text | Especifica el contenido del área de texto |
Compatibilidad del navegador
| Propiedad | |||||
|---|---|---|---|---|---|
| value | Yes | Yes | Yes | Yes | Yes |
Ejemplo
Ejemplo
Obtener el contenido de texto de textarea:
var x = document.getElementById("myTextarea").value;
Pruébalo »
Otras extensiones
Objeto Textarea