Substring text with javascript including html tags
<p>i wanted to substring a string something like follow. And i have start position and length of the string . 
i have checked this ques <a href="http://stackoverflow.com/questions/6003271/substring-text-with-html-tags-in-javascript">Substring text with html tags in javascript</a>. But in this substring is performing from 0 but i have a random start position. Any idea about how it will done</p>

<pre><code>var str = 'Lorem ipsum &lt;p&gt;dolor &lt;strong&gt;sit&lt;/strong&gt; amet&lt;/p&gt;, consectetur adipiscing elit.'
</code></pre>

<p>var tem=str.substr(13,2);</p>

<p>now the answer should be <code>&lt;p&gt;ol&lt;/p&gt;</code></p>
