<input type="text" id="t-it">
<script>
var input = document.getElementById('t-it');
input.value = localStorage.savedText || '';
function save() {
localStorage.savedText = input.value;
}
</script>
<input class="button" type="button" onclick="save()" value="save">