A basic example of how to use HTML5 LocalStorage
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
index.html
script.js

README.md

localstorage

A basic example of how to use HTML5 LocalStorage. Type a username and password into the fields and click "Log in" to display the data in an alert. The data is stored at this point. Then you can retrieve it by clicking "Show Data".

To test that LocalStorage is working, remove the localStorage.setItem lines in the script.js code, then fill in the fields and click "Log in". The alert will display the values but clicking the "Show Data" button will display "null".