Storing and retrieving data using HTML Local Storage
Here is the sample HTML file with javascript to store data in HTML local storage.
You can run it here. Click the below button to add the lines for text1, text2 and text3 in local storage.
You can run it here. Click the below button to add the lines for text1, text2 and text3 in local storage.
This is text1.
Sample text2.
Text3 example.
If you are using Google Chrome below are the steps to check if the data was stored.- Click Menu > More Tools > Developer Tools (Ctrl + Shift + I)
- Click "Application"
- In the left pane under Storage navigate to Local Storage > http://SQLGear.blogspot.in
- In the right pane, you could find the data you just inserted against the key "List".