how to transfer data from 2 html files

53

how to pass the data from one page to another in javascript -

var favoritemovie = "Shrek";
sessionStorage.setItem("favoriteMovie", favoritemovie);

how to transfer data from 2 html files -

localStorage["key"] = value;

// ... in another page ...
value = localStorage["key"];

Comments

Submit
0 Comments