javascript - Using localStorage to achieve the top row of a table when clicked and refresh the page to keep the current state
習慣沉默
習慣沉默 2017-06-28 09:27:46
0
2
695

Since at least 3 column values ​​are required to determine the unique row

So my idea is
1. Every time you click the top button, store the value of the 3 columns (each column has 1 key) in the corresponding row into localStorage, that is, the save process
2. Every time When the page is reloaded for the first time, the local data is read. After obtaining the table data, the three columns of each row are compared with the existing local data. If they are equal, they will be kept on top

The above idea, now my problem is:
After multiple clicks, the value of the key corresponding to each column should be more than one. How to compare
I don’t know the specific usage of the for loop

習慣沉默
習慣沉默

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!