HTML table manipulation in JavaScript | JavaScript Tutorial for Beginners

Published: 14 February 2020
on channel: Programmers Blog System
217
5

Table Object
The Table object represents an HTML table element.

Access a Table Object
You can access a table element by using getElementById()

Create a Table Object
You can create a table element by using the document.createElement() method

Table Object Collections

Collection Description
rows Returns a collection of all tr elements in a table
tBodies Returns a collection of all tbody elements in a table

Table Object Methods
Method Description
createCaption() Creates an empty caption element and adds it to the table
createTFoot() Creates an empty tfoot element and adds it to the table
createTHead() Creates an empty thead element and adds it to the table
deleteCaption() Removes the first caption element from the table
deleteRow() Removes a row (tr) from the table
deleteTFoot() Removes the tfoot element from the table
deleteTHead() Removes the thead element from the table
insertRow() Creates an empty tr element and adds it to the table

Subscribe us on Channel :    / @programmersblogsystem  


On this page of the site you can watch the video online HTML table manipulation in JavaScript | JavaScript Tutorial for Beginners with a duration of hours minute second in good quality, which was uploaded by the user Programmers Blog System 14 February 2020, share the link with friends and acquaintances, this video has already been watched 217 times on youtube and it was liked by 5 viewers. Enjoy your viewing!