0

Html storing of data- local and session storage

I understand that one uses forms in html to enable the user to input data but how does one use the following syntax "localStorage.setItem("key1","value1");" to store the data the user inputs. Can someone just make a simple mock-up example using the local storage syntax i mentioned to help me gain a comprehensive understanding.

8th Apr 2017, 3:47 PM
Mogammad Shameer Losper
Mogammad Shameer Losper - avatar
2 Réponses
+ 9
Webstorage doesn't work in Sololearn android app' code playground, but works on Sololearn website code playground ^^
8th Apr 2017, 4:35 PM
visph
visph - avatar
+ 1
In this example field values will be saved to local storage and when u click on show it will show the saved values. unfortunately SoloLearn mobile app gives access denied error. try it on web site or local. if u hoping to save multiple field data to local store using single key, create JSON object and save it in local store. https://code.sololearn.com/WytNpBwOAApu/?ref=app
8th Apr 2017, 4:14 PM
Eranga
Eranga - avatar