I am describing some html elements as value of thickbox and its possible to fetch that elements inside textarea
Sample
<textarea id="txtarea_id"><div class="div_class">country</div></textarea>
I need to fetch the div element inside textarea
I am describing some html elements as value of thickbox and its possible to fetch that elements inside textarea
Sample
<textarea id="txtarea_id"><div class="div_class">country</div></textarea>
I need to fetch the div element inside textarea
<!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field -->
— http://www.w3.org/TR/html4/interact/forms.html#h-17.7
A textarea element can contain only PCDATA, no elements of any kind. The code you have presented is invalid HTML.
You could have the value of a textarea be some text that could be presented as HTML:
<textarea id="txtarea_id"><div class="div_class">country</div></textarea>
… but the content can only be text, not elements.
You can fetch the data using jQuery's val() method (or just use the standard DOM .value).
Use jQuery's .val()
alert($('#txtarea_id').val());
If you want to convert that text to an HTML element, use $ and wrap it like this.
$($('#txtarea_id').val());