Textfield to use in iBooks

You would need your script to also look and see if the localstorage value exists, and then place it within the input field if it does.

There's a few events here which may be helpful:

And here's an actual example of local storage in action in a Widget: