I’m new at JS.
I need to remove TR elements from parent table but the problem is there are no table ID/Name
Is it possible to perform it?
Please see attach - i need remove red marked block… what scrip i have to use if i will put it to the green block?
Thank you.
function remove_rows(el)
{
var table = el.parentNode.parentNode.parentNode;
var rows = table.rows.length;
for(var i = rows-1; i > = 0; i--)
{
table.deleteRow(i);
}
}