localStorage.getItem will retrive value.
and setItem will set value.
But If I want to know which key was associated with this particular value? Then how to get Key of that.?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
visit Html5 Storage Doc to get more details. Use the following syntax to set and get the values in localstorage/sessionstorage
for storing values for a session
or store values permanently using
and u said u want to know the value but you want key then you can use the function
or also you can loop through the available keys and get the desired key by cross checking the value