how to use localStorage in javascript
By   Posted on May-22-2018 178
.Net
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");
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");
By   22-May-2018
Views 178
Share This with your friend by choosing any social account
You may also read following recent Post
![]() |
How old are you and what is your net worth? Also, what is your educational background and what sort of a job do you do? Do you enjoy your work?
47 By Nauman Shafi |
![]() |
create appointment booking page with available time slot using database ms sql server
50 By Junaid A |
![]() |
what is Asp.Net Core
64 By Junaid A |
![]() |
publish has encountered an error Object reference not set to an instance of an object A diagnostic log has been written to following location
96 By Junaid A |
![]() |
The provided URI scheme 'http' is invalid; expected 'https'." & vbCrLf & "Parameter name: via
105 By Junaid A |
![]() |
C# Language Basics
1667 By |
![]() |
Crud in Asp.NET using tabs
635 By Haider |
![]() |
Parser Error
699 By Usman Jafar |
![]() |
What are 3 C
192 By |
![]() |
what is .net
418 By |
![]() |
How to post uploaded file and form data in MVC using jquery?ts Common scenario where you want to pos
224 By |
![]() |
MVC url routing
263 By |
![]() |
Learn about Session
288 By |