get variable value from another html script code example
Example: how to pass the data from one page to another in javascript
var favoritemovie = "Shrek";
sessionStorage.setItem("favoriteMovie", favoritemovie);
var favoritemovie = "Shrek";
sessionStorage.setItem("favoriteMovie", favoritemovie);