<textarea id="campo1"> Hola! </textarea> <script> var text = document.getElementById("campo1").value; alert(text); </script>