Javascript examples for jQuery:Variable
share JS variables between pages using localStorage
<html> <head> <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script> </head> <body> <p id="nome"></p> <script> $(document).ready(function(){ document.getElementById("nome").innerHTML = localStorage.getItem("key"); });//from w ww . ja va2s. c o m </script> </body> </html>