简体   繁体   中英

Update web table dynamically using javascript

I had a requirement, I will be getting the data at run-time from xml and this data needs to get updated in a table on html page.

Conditions:

  1. If there is not table available on the page then create a table and update

  2. If there is a table in the page update the new data to the table

You can do it using AJAX by calling your JavaScript function after a specific period of time, create a table first when you get your first data and after that, you can just append rows to that table.

You can check this link for JavaScript timing events.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM