Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

sessionstorage array

var testArray = ["Shirt", "Bottom", "Shoes"];
window.sessionStorage.setItem("items", JSON.stringify(testArray));
var storedArray = JSON.parse(sessionStorage.getItem("items"));//no brackets
var i;
for (i = 0; i < storedArray.length; i++) {
             alert(storedArray[i]);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: datetime knex 
Javascript :: Properly upgrade node using nvm 
Javascript :: disable angular cache option 
Javascript :: json to list flutter 
Javascript :: jquery get text of input 
Javascript :: jquery focus 
Javascript :: alphabet javascript 
Javascript :: angular bind checkbox 
Javascript :: how to find the smallest two numbers in an array javascript 
Javascript :: discord.js on ready 
Javascript :: reverse every word 
Javascript :: history.push with params 
Javascript :: js input type range get value while sliding 
Javascript :: disable scroll on modal open 
Javascript :: select checked checkboxes javascript 
Javascript :: How to call a c# functio from Javascript 
Javascript :: JavaScript HTML DOM - Changing CSS 
Javascript :: jquery loop through collection backwards 
Javascript :: replace class js 
Javascript :: activeclassname in react router v6 
Javascript :: output in javascript 
Javascript :: return only specific attributes when making query mongoose 
Javascript :: regex separator 
Javascript :: jquery $(document.on click 
Javascript :: get public url as laravel asset() in jquery 
Javascript :: discord.js button 
Javascript :: moment format date 
Javascript :: jquery select all checkboxes 
Javascript :: set dropdown in jquery 
Javascript :: get closest element id jquery 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =