Here is an example of HTML5's LocalStorage.
Here is a fiddle http://jsfiddle.net/ccatto/G2SyC/2/ code demo example.
A simple code would be:
// saving data into local storage
localStorage.setItem('LocalStorageKey', txtboxFooValue);
// getting data from localstorage
var retrivedValue = localStorage.getItem('LocalStorageKey', retrivedValue);
Here is a more complete code example where you enter text into a textbox and click a button. Then the text is stored into LocalStorage and retrieved and displayed in a div.
HTML LocalStorage Example
Hope this helps!