title: How to get a selected div portion from a variable containing html code by using javascript?
body: <p>I have a variable <code>var 'html'</code>, it contains some html codes .in it there is a <strong>div</strong> with id <code>messages</code>. I want to get only that div contents from the 'html' variable into another variable using javascript.<br>
  Please help . .</p>