The only difference between adding a row to a table and adding a column is which table element we loop on and that we don’t need to create quite so many tags.
- The Basics
- Basic DOM
- DOM Tables
- DOM Forms
- Server Interaction
- Regular Expressions
- Error Handling
- Using Functions
- Object Oriented
- Extend Objects
- Homework Questions
- The Bad Bits
To add a row to a table we need to not only add the tr tag but also all of the cells in the row. The table DOM methods make this as easy to do as deleting columns.
While deleting a row from a table is relatively easy, deleting a column from a table is somewhat harder since you need to remove each cell separately. It isn’t all that much harder though as this example demonstrates.
All rows of a table are made up of cells. These cells have the same relationship to the row that contains them as the rows do to the thead, tfoot, and tbody tags that contain them and so the cells can be accessed the same way that the rows can. The one significant difference with […]
Now that we have looked at the properties that allow access to most of the component parts of a table, we can move on to some of the table specific methods that are available. The simplest will delete a row from the table.
This site is © copyright Stephen Chapman - Felgall Pty Ltd 2011-2015.