I want to replace the <td> tag.
My code looks like this:
var divele = document.createElement("div");
divele.innerHTML = "<td><p>content</p></td>";
var tdele = document.getElementByd("tdid");
tdele.parentNode.replaceChild(divele.firstChild,tdele);
The tdid is replaced with the <p> tag content only not with the <td>.
When I assign the <td> content to the innerHTML of the <div>, the <td> is replaced from that content (as per the block level element).
How do I replace the <td> with the new <td> content using innerHTML?