On Sep 20, 1:16*am, laredotornado <laredotorn...@zipmail.comwrote:
Hi,
I have a TBODY node with id="thebody". *How do I use JS to empty all
its contents so that the DOM after the call would look like
<tbody id="thebody"></tbody>
? *Thanks, - Dave
For a large number of rows, it may be faster to replace the tbody with
a shallow clone of itself:
var el = document.getElementById('theBody');
el.parentNode.replaceChild(el.cloneNode(false), el);
--
Rob