How can I pass variables between two html pages using jQuery?
file1.html
<form>
First name : <input type="text" id="firstname"/>
</form>
file2.html:
<p> <!--retrieve firstname here --> </p>
How can I pass variables between two html pages using jQuery?
file1.html
<form>
First name : <input type="text" id="firstname"/>
</form>
file2.html:
<p> <!--retrieve firstname here --> </p>
You could use localStorage:
// Store (on first page)
localStorage.setItem("firstname", "Smith");
// Retrieve (on second page)
var firstname = localStorage.getItem("firstname");
More info: http://www.w3schools.com/html/html5_webstorage.asp