I have stored some data in localStorage. Then, when initializing the page, I need to fill in the number of the data to the plus or minus sign of the page. how can I solve this problem in general? I want to use the jquery selector to select the corresponding data-id attribute and then fill it in. this...
I stored some data in localStorage.
Then, when initializing the page, I need to fill in the number of the data to the plus or minus sign of the page. how can I solve this problem? What I want is to use the jquery selector to select the corresponding data-id attribute and then fill it in. is this desirable? Is there a better way?
...]
Reply content:
I stored some data in localStorage.
Then, when initializing the page, I need to fill in the number of the data to the plus or minus sign of the page. how can I solve this problem? What I want is to use the jquery selector to select the corresponding data-id attribute and then fill it in. is this desirable? Is there a better way?
...]
I think this method is!
You can do this by using this method to process objects in localStorage.
{ 20160611:{name:"test"...}, 20160612:{name:"test"...}, 20160613:{name:"test"...}}
Put the entire object in a key.
Thank you for your invitation. You can.
Thank you!
This method is feasible.
Thank you for inviting me. I have never actually tried it. in principle, it should be okay. just try it.