sessionStorage

Need to call a variable in javascript, that haven’t been set? Need to pass variables between pages in your browser?

For Class A browsers only:

// Save data to a the current session's store
sessionStorage.setItem("username", "John");
 
// Access some stored data
alert( "username = " + sessionStorage.getItem("username"));

developer.mozilla.org/en-US/docs/DOM/Storage

Advertisements