1$('input#mybutton').click(function() {
2 var text = $('textarea#mytextarea').val();
3 //send to server and process response
4});
1<textarea id="myTextarea">
2Hello World
3</textarea>
4
5<script>
6 var x = document.getElementById("myTextarea").value;
7</script>