Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How to dynamically add rows in an HTML table using JavaScript?

I want to have a form below a table on my webpage that will allow you to add a row to the table. It should request that you enter four fields (one for each column) of the new row and should update the table upon submission of the form. The newest row should be at the top.

If anyone can help me with the combination of JavaScript and HTML, that would be appreciated!

1 Answer

Relevance
  • Andy T
    Lv 7
    8 years ago
    Favorite Answer

    The faster way is to manipulate a <table> DOM object's innerHTML but that isn't "standard" the standard way is the long way around to manipulate the memory tree.

Still have questions? Get your answers by asking now.