This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15441|Reply: 1

[Jquery] jquery implements table to display up to 10 pieces of data

[Copy link]
Posted on 8/10/2017 5:14:03 PM | | | |

I want to display the latest 10 data in the table in real time, dynamically refresh

The code is implemented in js, which is to delete the old data and add new data!

The interface renderings are as follows:



The html code is as follows:

js method is as follows:



Just throw the json object directly into the updateTable method!




Previous:Misunderstanding of count(0) and count(*) in SQL statements
Next:Three-level classification of provinces and municipalities in circular obtaining (one-to-one correspondence)
 Landlord| Posted on 8/10/2017 5:16:38 PM |
Get the total number of rows tr for the table

$("#tableid").find("tr").length ;

//获取所在行的行号

$(this).parent().prevAll().length + 1; line number

//获取所在列的列号

$(this).prevAll().length + 1; column
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com