HTMLタグでテキストを取得する方法はありますが、メインDIVからのみですか? 他の DIVS を形成しない。
以下に例を示しますが、テキストに html タグが含まれていないため、問題があります < br />
HTML
<div id='parent'>
this text is <br />for parent
<div id='child-parent'>
this text if for child-parent
<div id='child'>
and this text is for child.
</div>
</div>
</div>
jQuery
alert($('#parent').clone().children().remove().end().html());