Range Selection HTML in Chrome
<p>I am Facing a problem in JavaScript to get html for selected text using 
    range for eg:-  i have an html like:-</p>

<pre><code>  &lt;span&gt;demo text&lt;/span&gt; 
</code></pre>

<p>Now in Chrome when i select the "demo Text" then i want span tag with inner text.
I have tried the following code for that but not able to get the desired output in Chrome.</p>

<pre><code>var rangeTemp = selection.getRangeAt(0);      
clonedSelection = rangeTemp.cloneContents();
var div = document.createElement('div');
div.appendChild(clonedSelection);

word = div.innerHTML;
</code></pre>

<p>the Above code working fine in IE and Firefox but <strong>not in chrome</strong>.</p>

<p>Thanks &amp; Regards</p>

<p>Anil</p>
