EN
JavaScript - get textarea field value
9
points
In this short article, we would like to show how to get textarea value using JavaScript.
Quick solution:
// ONLINE-RUNNER:browser;
<textarea id="my-textarea">Some text here ...</textarea>
<script>
var element = document.querySelector('#my-textarea');
console.log(element.value); // Some text here ...
</script>