Save user input in a form or textarea automatically. It can also be exported at the end. See its usage at www.palmer.im/notes. Uses lots of other people's stuff so I can't take credit for it (apart from glueing all the pieces together)
See index.html for a simple version, styledindex.html for how it can be incorporated. The script in index.html should probably be stored outside the html file.