Replace the TD tag
<p>I want to replace the <code>&lt;td&gt;</code> tag. </p>

<p>My code looks like this:</p>

<pre><code>var divele = document.createElement("div");
divele.innerHTML = "&lt;td&gt;&lt;p&gt;content&lt;/p&gt;&lt;/td&gt;";

var tdele = document.getElementByd("tdid");
tdele.parentNode.replaceChild(divele.firstChild,tdele);
</code></pre>

<p>The <code>tdid</code> is replaced with the <code>&lt;p&gt;</code> tag content only not with the <code>&lt;td&gt;</code>. </p>

<p>When I assign the <code>&lt;td&gt;</code> content to the <code>innerHTML</code> of the <code>&lt;div&gt;</code>, the <code>&lt;td&gt;</code> is replaced from that content (as per the block level element).</p>

<p>How do I replace the <code>&lt;td&gt;</code> with the new <code>&lt;td&gt;</code> content using <code>innerHTML</code>?</p>
