DOMDocument
table.firstChild.innerHTML = '';
var tBodies = document.getElementById('mytable').tBodies; for(var i = 0; i < tBodies.length; ++i) { while(tBodies.length) { tBodies.deleteRow(0); } }