17
rated 0 times
[
21]
[
4]
/ answers: 1 / hits: 180472
/ 13 Years ago, wed, december 7, 2011, 12:00:00
I'm just wondering how to get all key values in localStorage
.
I have tried to retrieve the values with a simple JavaScript loop
for (var i=1; i <= localStorage.length; i++) {
alert(localStorage.getItem(i))
}
But it works only if the keys are progressive numbers, starting at 1.
How do I get all the keys, in order to display all available data?
More From » html