Horje

Learn localStorage Object

<script>
// Store
localStorage.setItem("lastname", "Smith");

// Retrieve
document.getElementById("result").innerHTML = localStorage.getItem("lastname");
</script>

Output should be:

Learn localStorage Object



Related Articles
What is HTML Web Storage API HTML Web Storage API
What is HTML Web Storage? HTML Web Storage API
What Browsers will Support HTML Web Storage API HTML Web Storage API
How to create HTML Web Storage Objects HTML Web Storage API
How to create HTML localStorage Object HTML Web Storage API
How to create HTML sessionStorage Object HTML Web Storage API


Category:
Web Tutorial
Sub Category:
HTML Web Storage API
Uploaded by:
Admin



Share on: