Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript save data to local storage

// Store
localStorage.lastname = "Smith";
// Retrieve
document.getElementById("result").innerHTML = localStorage.lastname;
// Remove
localStorage.removeItem("lastname");
Source by blog.logrocket.com #
 
PREVIOUS NEXT
Tagged: #javascript #save #data #local #storage
ADD COMMENT
Topic
Name
9+8 =