how to get the value of a textarea in jquery?

Value of textarea is also taken with val method:

var message = $('textarea#message').val();
console.log(message);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<textarea cols="60" rows="5" id="message" name="message">
Hello,
 world!
</textarea>

Leave a Comment