How can I create a table row in between 2 ?
I am using the code below to create a row.
if (!document.getElementsByTagName) return;
tabBody=document.getElementsByTagName("TBODY").item(0);
row=document.createElement("TR");
cell1 = document.createElement("TD");
textnode1=document.createTextNode('');
cell1.appendChild(textnode1);
row.appendChild(cell1);
tabBody.appendChild(row);
}
Actually I want to create it as a middle row. Currently my table has 2 rows.
A table exposes its own methods that can be used to modify it:
A table row exposes a method that can be used to insert a new cell:
insertCell.Here are some basic examples.