Wednesday, October 14, 2009

Remove table rows dynamically using javascript

function removeRowsFromTable()
{
var tb2 = document.getElementById('ServicesTable');//table id
var lastRow = tb2.rows.length;
while (lastRow > 1) {
try{
lastRow--;
tb2.deleteRow(lastRow);

}catch(e){
}
}
}

No comments:

Buy Me A Coffee