Hey there,
I have a TABLE element with ID attribute "newCreationTable".
Then, I have the following piece of code below to add a row to the table :
...but unfortunately it creates a TBODY opening and closing tag.HTML Code:var newRow = document.createElement('tr'); var newCreationTable = document.getElementById('newCreationTable'); newCreationTable.appendChild(newRow);
How can I prevent the creation of the TBODY tag?
Reason why I want to prevent this, is because when I execute the code shown above for the 2nd, 3rd, etc.. time, the TABLE is malformed, since the TR elements are created after the TBODY closing tag.
Thanks for your help!











Bookmarks