Possible Duplicate:
how to get the value of a textarea in jquery?
I have the following HTML:
<div id="textdescription"></div>
And the following jQuery (var gets value from a form textarea):
var description = $('#inputDescription').html();
$('#textdescription').html(description);
How can I get the value into #description
val() : val() method is primarily used to get the values of form elements such as input, select and textarea.
html(): Get the HTML contents of the first element in the set of matched elements.
text(): Get the combined text contents of each element in the set of matched elements, including their descendants.
see demo here JsFiddle Demo