Answers for "how to read local storage in javascript"

4

javascript get local storage

var Item = localStorage.getItem('youritem');
Posted by: Guest on February-22-2020
42

localstorage javascript

localStorage.setItem('user_name', 'Rohit'); //store a key/value
var retrievedUsername = localStorage.getItem('user_name'); //retrieve the key
Posted by: Guest on October-23-2019
0

how to setItem and getItem in javascript in localStorage

function set(){
    var sendJSON = JSON.stringify(allMovie);
    localStorage.setItem('allMovie',sendJSON)
}

function get(){
    var getJSON = localStorage.getItem('allMovie');
    if (getJSON){
        allMovie = JSON.parse(getJSON)
    }

}
Posted by: Guest on August-10-2020
0

get local storage value javasccipt

var x = localStorage.getItem("mytime");
Posted by: Guest on August-12-2021

Code answers related to "how to read local storage in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language