
Anyway to Clear / Delete / Remove all rows from an HTML Table
I have worked out how to dynamically create rows and cells of a table
with
myrow = document.all.tablename.insertrow()
and
mycell = myrow.insertcell()
mycell.innerhtml = "values"
but how do I delete them to re-create it with new data. Deleterow()
seems a bit crude and as it does not take a number value, probably a
bit slow, if the original table is big.
Also why does document.all.tabname.rows.length = 1 when no rows have
been added to a table nor have any been specified in original HTML
only
<table id="testtab"></table>
Thanks for any help
Tim