how to use localStorage in javascript
how to use localStorage in javascript?
below code will be in <javascript> code here </script>
set value
localStorage.setItem("key", "value");
Get value
var lastname = localStorage.getItem("key");
if (lastname)
{
// do some things if have value
}
else
{
// do some things
}
Remove value
localStorage.removeItem("key");
Share This with your friend by choosing any social account